Documentation ¶
Index ¶
- Constants
- type HeathCheckRecord
- type RedisHealthChecker
- func (r *RedisHealthChecker) Check(request *plugin.CheckRequest) (*plugin.CheckResponse, error)
- func (r *RedisHealthChecker) DebugHandlers() []model.DebugHandler
- func (r *RedisHealthChecker) Delete(ctx context.Context, id string) error
- func (r *RedisHealthChecker) Destroy() error
- func (r *RedisHealthChecker) Initialize(c *plugin.ConfigEntry) error
- func (r *RedisHealthChecker) Name() string
- func (r *RedisHealthChecker) Query(ctx context.Context, request *plugin.QueryRequest) (*plugin.QueryResponse, error)
- func (r *RedisHealthChecker) Report(ctx context.Context, request *plugin.ReportRequest) error
- func (r *RedisHealthChecker) Suspend()
- func (r *RedisHealthChecker) SuspendTimeSec() int64
- func (r *RedisHealthChecker) Type() plugin.HealthCheckType
Constants ¶
View Source
const ( // PluginName plugin name PluginName = "heartbeatRedis" // Sep separator to divide id and timestamp Sep = ":" // Servers key to manage hb servers Servers = "servers" // CountSep separator to divide server and count CountSep = "|" )
把操作记录记录到日志文件中
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeathCheckRecord ¶
HeathCheckRecord 心跳记录
func (*HeathCheckRecord) Deserialize ¶
func (h *HeathCheckRecord) Deserialize(value string, compatible bool) error
Deserialize 反序列为对象
func (*HeathCheckRecord) Serialize ¶
func (h *HeathCheckRecord) Serialize(compatible bool) string
Serialize 序列化成字符串
type RedisHealthChecker ¶
type RedisHealthChecker struct {
// contains filtered or unexported fields
}
RedisHealthChecker 心跳检测redis
func (*RedisHealthChecker) Check ¶
func (r *RedisHealthChecker) Check(request *plugin.CheckRequest) (*plugin.CheckResponse, error)
Check Report process the instance check
func (*RedisHealthChecker) DebugHandlers ¶
func (r *RedisHealthChecker) DebugHandlers() []model.DebugHandler
func (*RedisHealthChecker) Delete ¶
func (r *RedisHealthChecker) Delete(ctx context.Context, id string) error
Delete delete the target id
func (*RedisHealthChecker) Destroy ¶
func (r *RedisHealthChecker) Destroy() error
Destroy plugin destroy
func (*RedisHealthChecker) Initialize ¶
func (r *RedisHealthChecker) Initialize(c *plugin.ConfigEntry) error
Initialize initialize plugin
func (*RedisHealthChecker) Query ¶
func (r *RedisHealthChecker) Query(ctx context.Context, request *plugin.QueryRequest) (*plugin.QueryResponse, error)
Query queries the heartbeat time
func (*RedisHealthChecker) Report ¶
func (r *RedisHealthChecker) Report(ctx context.Context, request *plugin.ReportRequest) error
Report process heartbeat info report
func (*RedisHealthChecker) Suspend ¶
func (r *RedisHealthChecker) Suspend()
Suspend checker for an entire expired interval
func (*RedisHealthChecker) SuspendTimeSec ¶
func (r *RedisHealthChecker) SuspendTimeSec() int64
SuspendTimeSec get suspend time in seconds
func (*RedisHealthChecker) Type ¶
func (r *RedisHealthChecker) Type() plugin.HealthCheckType
Type for health check plugin, only one same type plugin is allowed
Click to show internal directories.
Click to hide internal directories.