public AgentSinkTests()
 {
     _fixture             = new Fixture().Customize(new AutoNSubstituteCustomization());
     _socketClientFactory = _fixture.Create <ISocketClientFactory>();
     _client = new TestClient();
     _socketClientFactory.GetClient(Endpoint.DEFAULT_TCP_ENDPOINT).Returns(_client);
 }
Exemplo n.º 2
0
 public AgentSink(
     string logGroupName,
     string logStreamName,
     Endpoint endpoint,
     ISocketClientFactory clientFactory,
     IConfiguration config,
     ILoggerFactory loggerFactory)
 {
     _logGroupName            = logGroupName;
     _logStreamName           = logStreamName;
     _socketClient            = clientFactory.GetClient(endpoint);
     _queue                   = new BlockingCollection <string>(config.AgentBufferSize);
     _logger                  = loggerFactory.CreateLogger <AgentSink>();
     _cancellationTokenSource = new CancellationTokenSource();
     _sender                  = RunSenderThread(loggerFactory);
 }