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 ¶
func (NopCommandObserver) OnCommand(context.Context, CommandEvent)
type NopLeaseObserver ¶
type NopLeaseObserver struct{}
NopLeaseObserver 是空实现租约锁观测器。
func (NopLeaseObserver) OnLease ¶
func (NopLeaseObserver) OnLease(context.Context, LeaseEvent)
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 ¶
func (NopStoreObserver) OnStore(context.Context, StoreEvent)
type ProfileEvent ¶
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 观测事件。
Click to show internal directories.
Click to hide internal directories.