public HttpWorkerChannelFactory(IEnvironment environment, ILoggerFactory loggerFactory, IOptions <HttpWorkerOptions> httpWorkerOptions, IOptionsMonitor <ScriptApplicationHostOptions> applicationHostOptions, IHttpWorkerProcessFactory httpWorkerProcessFactory, IHttpWorkerService httpWorkerService) { _loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); _httpWorkerOptions = httpWorkerOptions.Value ?? throw new ArgumentNullException(nameof(httpWorkerOptions.Value)); _httpWorkerProcessFactory = httpWorkerProcessFactory ?? throw new ArgumentNullException(nameof(httpWorkerProcessFactory)); _httpWorkerService = httpWorkerService ?? throw new ArgumentNullException(nameof(httpWorkerService)); }
internal HttpWorkerChannel( string workerId, IWorkerProcess rpcWorkerProcess, IHttpWorkerService httpWorkerService, ILogger logger, IMetricsLogger metricsLogger, int attemptCount) { Id = workerId; _rpcWorkerProcess = rpcWorkerProcess; _workerChannelLogger = logger; _httpWorkerService = httpWorkerService; _startLatencyMetric = metricsLogger?.LatencyEvent(string.Format(MetricEventNames.WorkerInitializeLatency, "HttpWorker", attemptCount)); }