예제 #1
0
        public NamingGrpcClientProxy(
            ILogger logger,
            string namespaceId,
            SecurityProxy securityProxy,
            IServerListFactory serverListFactory,
            NacosSdkOptions options,
            ServiceInfoHolder serviceInfoHolder)
        {
            this._logger        = logger;
            this.namespaceId    = namespaceId;
            this.uuid           = Guid.NewGuid().ToString();
            this._options       = options;
            this._securityProxy = securityProxy;

            this.requestTimeout = options.DefaultTimeOut > 0 ? options.DefaultTimeOut : 3000L;

            Dictionary <string, string> labels = new Dictionary <string, string>()
            {
                { RemoteConstants.LABEL_SOURCE, RemoteConstants.LABEL_SOURCE_SDK },
                { RemoteConstants.LABEL_MODULE, RemoteConstants.LABEL_MODULE_NAMING },
            };

            this.rpcClient    = RpcClientFactory.CreateClient(uuid, RemoteConnectionType.GRPC, labels);
            this._redoService = new NamingGrpcRedoService(_logger, this);

            Start(serverListFactory, serviceInfoHolder);
        }
예제 #2
0
 public RedoScheduledTask(ILogger logger, NamingGrpcClientProxy clientProxy, NamingGrpcRedoService redoService)
 {
     this._logger      = logger;
     this._clientProxy = clientProxy;
     this._redoService = redoService;
 }