Example #1
0
 public NacosDiscoveryClient(
     IOptionsMonitor <NacosDiscoveryOptions> optionAccs
     , INacosNamingClient nacosNamingClient
     , INacosServiceRegistrar registrar    = null,
     ILogger <NacosDiscoveryClient> logger = null) : this(optionAccs.CurrentValue, nacosNamingClient, registrar, logger)
 {
 }
Example #2
0
 public NacosDiscoveryClient(NacosDiscoveryOptions options
                             , INacosNamingClient nacosNamingClient
                             , INacosServiceRegistrar registrar    = null,
                             ILogger <NacosDiscoveryClient> logger = null
                             )
 {
     _client      = nacosNamingClient ?? throw new ArgumentNullException(nameof(nacosNamingClient));
     _options     = options ?? throw new ArgumentNullException(nameof(options));
     this._logger = logger;
     //_thisServiceInstance = new ThisServiceInstance(options);
     _registrar = registrar;
     if (_registrar != null)
     {
         _registrar.Start();
         _thisServiceInstance = new ThisServiceInstance(_registrar.Registration);
     }
 }