Heartbeat
Example:heartbeat
You can set automatic heartbeat ping/pong to keep connection alive.
Rpcx servers can handle heartbeat requests automatically and you don't need to do more configurations.
Clients should enable heartbeat option in Client option and set the heartbeat interval:
option := client.DefaultOption
option.Heartbeat = true
option.HeartbeatInterval = time.Second
By smallnest updated 2018-03-27 11:12:10
原文: