Ejemplo n.º 1
0
        public LeaseKeepAliveResponse KeepAliveOnce(long leaseId, LeaseOption option = null)
        {
            Grpc.Core.CallOptions callOptions = new Grpc.Core.CallOptions();

            var rsp = leaseClient.LeaseKeepAlive(callOptions);

            return(null);
        }
Ejemplo n.º 2
0
        public LeaseTimeToLiveResponse TimeToLive(long leaseId, LeaseOption option)
        {
            Etcdserverpb.LeaseTimeToLiveRequest leaseTimeToLiveRequest = new Etcdserverpb.LeaseTimeToLiveRequest
            {
                ID   = leaseId,
                Keys = option.IsAttachedKeys
            };
            var rsp = leaseClient.LeaseTimeToLive(leaseTimeToLiveRequest);
            LeaseTimeToLiveResponse response = new LeaseTimeToLiveResponse(rsp);

            return(response);
        }
Ejemplo n.º 3
0
        public LeaseTimeToLiveResponse TimeToLive(long leaseId, LeaseOption option)
        {
            Etcdserverpb.LeaseTimeToLiveRequest leaseTimeToLiveRequest = new Etcdserverpb.LeaseTimeToLiveRequest();
            leaseTimeToLiveRequest.ID   = leaseId;
            leaseTimeToLiveRequest.Keys = option.isAttachedKeys();
            var rsp = leaseClient.LeaseTimeToLive(leaseTimeToLiveRequest);
            LeaseTimeToLiveResponse response = new LeaseTimeToLiveResponse(rsp);

            return(response);
            //return Util.ToCompletableFutureWithRetry(
            //     this.stub.LeaseTimeToLive(leaseTimeToLiveRequest),
            //      new FunctionResponse<Etcdserverpb.LeaseTimeToLiveRequest, LeaseTimeToLiveResponse>()
            //     );
        }