observability

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandEvent

type CommandEvent struct {
	Operation string
	Profile   string
	Key       string
	Duration  time.Duration
	Err       error
}

CommandEvent 表示一次底层 Redis 命令观测事件。

type CommandObserver

type CommandObserver interface {
	OnCommand(ctx context.Context, event CommandEvent)
}

CommandObserver 接收底层 Redis 命令观测事件。

type LeaseEvent

type LeaseEvent struct {
	Operation string
	Key       string
	Token     string
	Owner     string
	TTL       time.Duration
	Acquired  bool
	Owned     bool
	Err       error
}

LeaseEvent 表示租约锁相关操作事件。

type LeaseObserver

type LeaseObserver interface {
	OnLease(ctx context.Context, event LeaseEvent)
}

LeaseObserver 接收租约锁观测事件。

type NopCommandObserver

type NopCommandObserver struct{}

NopCommandObserver 是空实现命令观测器。

func (NopCommandObserver) OnCommand

type NopLeaseObserver

type NopLeaseObserver struct{}

NopLeaseObserver 是空实现租约锁观测器。

func (NopLeaseObserver) OnLease

type NopProfileObserver

type NopProfileObserver struct{}

NopProfileObserver 是空实现 profile 观测器。

func (NopProfileObserver) OnProfileStatus

func (NopProfileObserver) OnProfileStatus(context.Context, ProfileEvent)

type NopStoreObserver

type NopStoreObserver struct{}

NopStoreObserver 是空实现 store 观测器。

func (NopStoreObserver) OnStore

type ProfileEvent

type ProfileEvent struct {
	Profile     string
	State       string
	Err         error
	NextRetryAt time.Time
}

ProfileEvent 表示 profile 健康状态与可用性切换事件。

type ProfileObserver

type ProfileObserver interface {
	OnProfileStatus(ctx context.Context, event ProfileEvent)
}

ProfileObserver 接收运行时 profile 状态变化事件。

type StoreEvent

type StoreEvent struct {
	Operation string
	Key       string
	Codec     string
	Hit       bool
	TTL       time.Duration
	Size      int
	Err       error
}

StoreEvent 表示 typed store 操作事件。

type StoreObserver

type StoreObserver interface {
	OnStore(ctx context.Context, event StoreEvent)
}

StoreObserver 接收 typed value store 观测事件。

Jump to

Keyboard shortcuts

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