public RouteStore(RoutingData routingData, Func <IConsulService> serviceFactory, Func <ICurrentState> statsFactory) { _routingData = routingData; _serviceFactory = serviceFactory; _statsFactory = statsFactory; }
public CustomRouter(ILoggerFactory factory, RoutingData routingData, IEnumerable <IService> customRoutes) { _routingData = routingData; _log = factory?.CreateLogger <CustomRouter>(); foreach (var customRoute in customRoutes) { AddNewService(customRoute); } }
public RoutingHost(CustomRouter router, CondenserConfiguration config, ILoggerFactory logger, RoutingData routingData, IEnumerable <IService> customRoutes, Func <IConsulService> serviceFactory) { _routingData = routingData; _serviceFactory = serviceFactory; _logger = logger?.CreateLogger <RoutingHost>(); _client.Timeout = TimeSpan.FromMinutes(6); _router = router; _healthCheckUri = $"http://{config.AgentAddress}:{config.AgentPort}{HttpUtils.HealthAnyUrl}?index="; _serviceLookupUri = $"http://{config.AgentAddress}:{config.AgentPort}{HttpUtils.SingleServiceCatalogUrl}"; var ignore = WatchLoop(); foreach (var customRoute in customRoutes) { _router.AddNewService(customRoute); } }
public CustomRouter(ILoggerFactory factory, RoutingData routingData) { _routingData = routingData; _log = factory?.CreateLogger <CustomRouter>(); }
public Service(Func <string, HttpClient> clientFactory, ILoggerFactory logger, RoutingData routingData) { _logger = logger?.CreateLogger <Service>(); _clientFactory = clientFactory; _routingData = routingData; }