目录
当前位置: 首页 > 文档资料 > Etcd3 学习笔记 >

Lease service - LeaseKeepAlive方法

优质
小牛编辑
138浏览
2023-12-01

LeaseKeepAlive 方法取消一个租约.

  1. rpc LeaseKeepAlive(stream LeaseKeepAliveRequest) returns (stream LeaseKeepAliveResponse) {}

消息体

请求的消息体是 LeaseKeepAliveRequest:

  1. message LeaseKeepAliveRequest {
  2. // ID是要继续存活的租约的ID
  3. int64 ID = 1;
  4. }

应答的消息体是 LeaseKeepAliveResponse:

  1. message LeaseKeepAliveResponse {
  2. ResponseHeader header = 1;
  3. // ID是从继续存活请求中得来的租约ID
  4. int64 ID = 2;
  5. // TTL是租约新的 time-to-live
  6. int64 TTL = 3;
  7. }