public ResolvableServiceClient(string serviceName, string serviceVersion, IServiceDiscoveryClient serviceDiscoveryClient, IRestClient restClient) { this.serviceName = serviceName; this.serviceVersion = serviceVersion; this.serviceDiscoveryClient = serviceDiscoveryClient; this.restClient = restClient; }
public void WhenApplicationIsRegisteredMultipleTimes_ThenAllAddressesAreVisibleInServiceDiscovery() { const string appName = "test-service"; const int count = 10; var clients = new IServiceDiscoveryClient[count]; for (var i = 0; i < count; i++) { var builder = new BuilderSyntax() .RegisterApplication(appName) .WithAddress($"https://localhost:{5000 + i}") .WithTags("api", "test"); clients[i] = builder.Build(); } var result = clients[0].GetAllAsync(appName).Result; Assert.Equal(count, result.Length); for (var i = 0; i < count; i++) { clients[i].Dispose(); } }
public ConsulHttpClientFactoryPolicy(IServiceDiscoveryClient discoveryClient) { if (discoveryClient == null) { throw new ArgumentNullException(nameof(discoveryClient)); } _discoveryClient = discoveryClient; }
public ConsulMessageHandler(IServiceDiscoveryClient discoveryClient, string clientName) { _discoveryClient = discoveryClient; _clientName = clientName; }
public ConsulHttpClientFactoryPolicy(IServiceDiscoveryClient discoveryClient) { _discoveryClient = Check.NotNull(discoveryClient, nameof(discoveryClient)); }
public FlatContainerService(IServiceDiscoveryClient serviceDiscoveryClient) { _serviceDiscoveryClient = serviceDiscoveryClient ?? throw new ArgumentNullException(nameof(serviceDiscoveryClient)); }
public IndexModel(ILogger <IndexModel> logger, IServiceDiscoveryClient client) { _logger = logger; _client = client; }
public ConsulMessageHandler(IServiceDiscoveryClient discoveryClient) { _discoveryClient = discoveryClient; }