public MicroserviceDefinitionBuilderTests() { _logger = Substitute.For <IAlleyLogger>(); _descriptor = Substitute.For <IMicroserviceDescriptor>(); _textReaderFactory = Substitute.For <ITextReaderFactory>(); _sut = new MicroserviceDefinitionBuilder(_descriptor, _textReaderFactory, _logger); }
private static void HandleIfError(IResult result, StatusCode statusCode, IAlleyLogger logger) { if (result.IsFailure) { logger.Error(result.Message); throw new RpcException(new Status(statusCode, result.Message)); } }
public MicroserviceDefinitionBuilder( IMicroserviceDescriptor microserviceDescriptor, ITextReaderFactory textReaderFactory, IAlleyLogger logger) { _microserviceDescriptor = microserviceDescriptor; _textReaderFactory = textReaderFactory; _logger = logger; }
public MonitoringDirector( IHealthRegistration healthRegistration, IMetricsRegistration metricsRegistration, IAlleyLogger logger) { _healthRegistration = healthRegistration; _metricsRegistration = metricsRegistration; _logger = logger; }
public CpuUsageFetcher( HttpClient httpClient, IConfigurationProvider configurationProvider, IAlleyLogger logger) : base( httpClient, configurationProvider.CpuUsageQuery, logger) { }
public MicroserviceContext( IMicroserviceInstanceFactory microserviceInstanceFactory, IAlleyLogger logger) : this( new ConcurrentDictionary <string, IMicroservice>(), new ConcurrentDictionary <string, IMicroservice>(), new ConcurrentDictionary <Uri, IMicroserviceInstance>(), microserviceInstanceFactory, logger) { }
public HealthFetcher( HttpClient httpClient, IConfigurationProvider configurationProvider, IAlleyLogger logger) : base( httpClient, configurationProvider.HealthCheckQuery, logger) { }
public ConnectionSession(ChannelBase channel, Method <TRequest, TResponse> method, IMetricRepository metricRepository, IConfigurationProvider configurationProvider, IAlleyLogger logger) { _channel = channel; _method = method; _metricRepository = metricRepository; _configurationProvider = configurationProvider; _logger = logger; _target = FormatTarget(_channel.Target); }
public MicroserviceContext( IDictionary <string, IMicroservice> servicesOwners, IDictionary <string, IMicroservice> microservices, IDictionary <Uri, IMicroserviceInstance> instances, IMicroserviceInstanceFactory microserviceInstanceFactory, IAlleyLogger logger) { _servicesOwners = servicesOwners; _microservices = microservices; _instances = instances; _microserviceInstanceFactory = microserviceInstanceFactory; _logger = logger; }
public SessionFactory( IConnectionTargetProvider connectionTargetProvider, IMethodFactory <TRequest, TResponse> methodFactory, IMetricRepository metricRepository, IChannelProvider channelProvider, IConfigurationProvider configurationProvider, IAlleyLogger logger) { _connectionTargetProvider = connectionTargetProvider; _configurationProvider = configurationProvider; _methodFactory = methodFactory; _metricRepository = metricRepository; _channelProvider = channelProvider; _logger = logger; }
public MicroserviceContextTests() { _logger = Substitute.For <IAlleyLogger>(); _microserviceInstanceFactory = Substitute.For <IMicroserviceInstanceFactory>(); _servicesOwners = Substitute.For <IDictionary <string, IMicroservice> >(); _microservices = Substitute.For <IDictionary <string, IMicroservice> >(); _instances = Substitute.For <IDictionary <Uri, IMicroserviceInstance> >(); _sut = new MicroserviceContext( _servicesOwners, _microservices, _instances, _microserviceInstanceFactory, _logger); }
public static void HandleIfError(IResult result, IAlleyLogger logger) => HandleIfError(result, StatusCode.Cancelled, logger);
protected MetricFetcherBase(HttpClient httpClient, string query, IAlleyLogger logger) { _httpClient = httpClient; _query = query; _logger = logger; }