Skip to content

不读取返回的消息是否不妥 #11

@sirodeneko

Description

@sirodeneko

if _, err := cli.KeepAlive(context.TODO(), resp.ID); err != nil {

官方文档

// KeepAlive keeps the given lease alive forever. If the keepalive response
// posted to the channel is not consumed immediately, the lease client will
// continue sending keep alive requests to the etcd server at least every
// second until latest response is consumed.
KeepAlive使给定的租约永远活着。
如果发布到通道上的keepalive响应没有立即被消耗,
租赁客户端将继续向etcd服务器发送keep alive请求,
至少每秒钟一次,直到最新的响应被消耗掉。

如果不进行读取,将会以每秒一次的频率进行需约。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions