public ClientWorker(ILogger logger, ConfigFilterChainManager configFilterChainManager, NacosSdkOptions options)
        {
            _logger = logger;
            _configFilterChainManager = configFilterChainManager;

            ServerListManager serverListManager = new ServerListManager(logger, options);

            _agent = options.ConfigUseRpc
                ? new ConfigRpcTransportClient(logger, options, serverListManager, _cacheMap)
                : new ConfigHttpTransportClient(logger, options, serverListManager, _cacheMap);
        }
Пример #2
0
        public ConfigRpcTransportClient(
            ILogger logger,
            NacosSdkOptions options,
            ServerListManager serverListManager,
            ConcurrentDictionary <string, CacheData> cacheMap)
        {
            this._logger            = logger;
            this._options           = options;
            this._serverListManager = serverListManager;
            this._accessKey         = _options.AccessKey;
            this._secretKey         = _options.SecretKey;
            this._cacheMap          = cacheMap;
            this._securityProxy     = new Security.SecurityProxy(options);

            StartInner();
        }
Пример #3
0
        public ConfigHttpTransportClient(
            ILogger logger,
            NacosSdkOptions options,
            ServerListManager serverListManager,
            ConcurrentDictionary <string, CacheData> cacheMap)
        {
            this._logger            = logger;
            this._options           = options;
            this._serverListManager = serverListManager;
            this._cacheMap          = cacheMap;
            this._securityProxy     = new Security.SecurityProxy(options, logger);
            Init();

            _agent = new ServerHttpAgent(_logger, options);

            StartInner();
        }
 public ConfigRpcServerListFactory(ServerListManager serverListManager)
 {
     this._serverListManager = serverListManager;
 }