mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: implement 'LeaseTimeToLive'
This commit is contained in:
parent
63b0cd470d
commit
78cfc8db95
@ -41,6 +41,11 @@ func (lp *leaseProxy) LeaseRevoke(ctx context.Context, rr *pb.LeaseRevokeRequest
|
|||||||
return pb.NewLeaseClient(conn).LeaseRevoke(ctx, rr)
|
return pb.NewLeaseClient(conn).LeaseRevoke(ctx, rr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (lp *leaseProxy) LeaseTimeToLive(ctx context.Context, rr *pb.LeaseTimeToLiveRequest) (*pb.LeaseTimeToLiveResponse, error) {
|
||||||
|
conn := lp.client.ActiveConnection()
|
||||||
|
return pb.NewLeaseClient(conn).LeaseTimeToLive(ctx, rr)
|
||||||
|
}
|
||||||
|
|
||||||
func (lp *leaseProxy) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error {
|
func (lp *leaseProxy) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error {
|
||||||
conn := lp.client.ActiveConnection()
|
conn := lp.client.ActiveConnection()
|
||||||
ctx, cancel := context.WithCancel(stream.Context())
|
ctx, cancel := context.WithCancel(stream.Context())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user