public GalileoAgent(AgentConfiguration configuration, IEntriesQueue queue) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (queue == null) { throw new ArgumentNullException(nameof(queue)); } Configuration = configuration; Queue = queue; collectorConnector = new CollectorConnector( new HttpClient(), Configuration.Host, Configuration.Port, Configuration.GalileoServiceToken, AgentName, AgentVersion, Configuration.Environment, Configuration.RequestCompression); flushTimer = new Timer(ElapsedFlushTimeout, this, 0, Configuration.FlushTimeout * 1000); }
public GalileoAgentDelegatingHandler(AgentConfiguration configuration, IEntriesQueue queue) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (queue == null) { throw new ArgumentNullException(nameof(queue)); } agentInstance = new GalileoAgent(configuration, queue); agentInstance.Start(); }
public static IApplicationBuilder UseGalileo(this IApplicationBuilder builder, AgentConfiguration configuration, IEntriesQueue queue) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (queue == null) { throw new ArgumentNullException(nameof(queue)); } GalileoAgentAccessor.AgentInstance = new GalileoAgent(configuration, queue); return(builder.UseMiddleware <GalileoAgentMiddleware>()); }