Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ping ¶
type Ping interface {
// SetRate 设置心跳的频率
SetRate(rateSecond int)
// UseCall 使用CALL方法执行ping命令
UseCall()
// UsePush 使用PUSH方法执行ping命令
UsePush()
// Name 插件的名字
Name() string
// AfterNewEndpoint runs ping woker.
AfterNewEndpoint(peer drpc.EarlyEndpoint) error
// AfterDial initializes heartbeat information.
AfterDial(sess drpc.EarlySession, isRedial bool) *drpc.Status
// AfterAccept initializes heartbeat information.
AfterAccept(sess drpc.EarlySession) *drpc.Status
// AfterWriteCall updates heartbeat information.
AfterWriteCall(ctx drpc.WriteCtx) *drpc.Status
// AfterWritePush updates heartbeat information.
AfterWritePush(ctx drpc.WriteCtx) *drpc.Status
// AfterReadCallHeader updates heartbeat information.
AfterReadCallHeader(ctx drpc.ReadCtx) *drpc.Status
// AfterReadPushHeader updates heartbeat information.
AfterReadPushHeader(ctx drpc.ReadCtx) *drpc.Status
}
Ping 插件接口
type Pong ¶
type Pong interface {
// Name returns name.
Name() string
// AfterNewEndpoint runs ping woker.
AfterNewEndpoint(endpoint drpc.EarlyEndpoint) error
// AfterWriteCall updates heartbeat information.
AfterWriteCall(ctx drpc.WriteCtx) *drpc.Status
// AfterWritePush updates heartbeat information.
AfterWritePush(ctx drpc.WriteCtx) *drpc.Status
// AfterReadCallHeader updates heartbeat information.
AfterReadCallHeader(ctx drpc.ReadCtx) *drpc.Status
// AfterReadPushHeader updates heartbeat information.
AfterReadPushHeader(ctx drpc.ReadCtx) *drpc.Status
}
Pong 心跳响应
Click to show internal directories.
Click to hide internal directories.