Documentation ¶
Index ¶
- Constants
- type HeathCheckRecord
- type RedisHealthChecker
- func (r *RedisHealthChecker) AddToCheck(request *plugin.AddCheckRequest) error
- func (r *RedisHealthChecker) Check(request *plugin.CheckRequest) (*plugin.CheckResponse, error)
- func (r *RedisHealthChecker) Delete(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(request *plugin.QueryRequest) (*plugin.QueryResponse, error)
- func (r *RedisHealthChecker) RemoveFromCheck(request *plugin.AddCheckRequest) error
- func (r *RedisHealthChecker) Report(request *plugin.ReportRequest) error
- 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" )
把操作记录记录到日志文件中
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) AddToCheck ¶
func (r *RedisHealthChecker) AddToCheck(request *plugin.AddCheckRequest) error
AddToCheck add the instances to check procedure
func (*RedisHealthChecker) Check ¶
func (r *RedisHealthChecker) Check(request *plugin.CheckRequest) (*plugin.CheckResponse, error)
Check Report process the instance check
func (*RedisHealthChecker) Delete ¶
func (r *RedisHealthChecker) Delete(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(request *plugin.QueryRequest) (*plugin.QueryResponse, error)
Query queries the heartbeat time
func (*RedisHealthChecker) RemoveFromCheck ¶
func (r *RedisHealthChecker) RemoveFromCheck(request *plugin.AddCheckRequest) error
RemoveFromCheck AddToCheck add the instances to check procedure
func (*RedisHealthChecker) Report ¶
func (r *RedisHealthChecker) Report(request *plugin.ReportRequest) error
Report process heartbeat info report
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.