Example #1
0
 public ServiceDiscoveryHostedService(IConsulClient consulClient, ServiceDiscoveryConfig serviceConfig)
 {
     this._consulClient  = consulClient;
     this._serviceConfig = serviceConfig;
 }
 private static ConsulClient CreateConsulClient(ServiceDiscoveryConfig serviceConfig) =>
 new ConsulClient(setup => setup.Address = serviceConfig.ServiceDiscoveryServerURL);