heartbeatredis

package
v1.13.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 10 Imported by: 0

Documentation

Index

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

type HeathCheckRecord struct {
	LocalHost  string
	CurTimeSec int64
}

HeathCheckRecord 心跳记录

func (*HeathCheckRecord) Deserialize

func (h *HeathCheckRecord) Deserialize(value string, compatible bool) error

Deserialize 反序列为对象

func (*HeathCheckRecord) IsEmpty

func (h *HeathCheckRecord) IsEmpty() bool

IsEmpty 是否空对象

func (*HeathCheckRecord) Serialize

func (h *HeathCheckRecord) Serialize(compatible bool) string

Serialize 序列化成字符串

func (HeathCheckRecord) String

func (h HeathCheckRecord) String() string

String 字符串化

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

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) Name

func (r *RedisHealthChecker) Name() string

Name plugin name

func (*RedisHealthChecker) Query

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

Type for health check plugin, only one same type plugin is allowed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL