heartbeatredis

package
v1.18.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 13 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"
	// CountSep separator to divide server and count
	CountSep = "|"
)

把操作记录记录到日志文件中

Variables

This section is empty.

Functions

This section is empty.

Types

type HeathCheckRecord

type HeathCheckRecord struct {
	LocalHost  string
	CurTimeSec int64
	Count      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) Check

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

func (r *RedisHealthChecker) Name() string

Name plugin name

func (*RedisHealthChecker) Query

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

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