protected EurekaDiscoveryClientBase(EurekaClientOptions clientOptions, EurekaInstanceOptions instOptions, IEurekaHttpClient httpClient, IApplicationLifetime lifeCycle = null, ILoggerFactory logFactory = null) { if (clientOptions == null) { throw new ArgumentNullException(nameof(clientOptions)); } ClientConfig = clientOptions; InstConfig = instOptions; if (InstConfig == null) { DiscoveryManager.Instance.Initialize(ClientConfig, httpClient, logFactory); } else { ConfigureInstanceIfNeeded(InstConfig); DiscoveryManager.Instance.Initialize(ClientConfig, InstConfig, httpClient, logFactory); } if (lifeCycle != null) { lifeCycle.ApplicationStopping.Register(() => { ShutdownAsync(); }); } Client = DiscoveryManager.Instance.Client; }
internal static void ConfigureDiscovery(IConfiguration config, DiscoveryOptions options, EurekaClientOptions clientOptions, EurekaInstanceOptions instOptions) { ConfigurationBinder.Bind(config, clientOptions); ConfigurationBinder.Bind(config, instOptions); options.ClientType = DiscoveryClientType.EUREKA; options.ClientOptions = clientOptions; options.RegistrationOptions = instOptions; }
internal protected EurekaDiscoveryClient(EurekaClientOptions clientOptions, EurekaInstanceOptions instOptions, IApplicationLifetime lifeCycle = null, ILoggerFactory logFactory = null) : base(clientOptions, instOptions, null, lifeCycle, logFactory) { }