Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnectionFailed = errors.New("etcd connection failed") ErrConnectionClosed = errors.New("etcd connection closed") ErrConnectionTimeout = errors.New("etcd connection timeout") ErrAuthenticationFailed = errors.New("etcd authentication failed") )
预定义错误 - 连接相关
View Source
var ( ErrInvalidConfig = errors.New("invalid config") ErrConfigNotFound = errors.New("config not found in cache") ErrConfigEmpty = errors.New("config is empty") ErrEndpointsEmpty = errors.New("etcd endpoints cannot be empty") )
预定义错误 - 配置相关
View Source
var ( ErrPutFailed = errors.New("etcd put operation failed") ErrDeleteFailed = errors.New("etcd delete operation failed") ErrGetFailed = errors.New("etcd get operation failed") ErrWatchFailed = errors.New("etcd watch failed") ErrWatchCanceled = errors.New("etcd watch canceled") )
预定义错误 - 操作相关
View Source
var ( ErrMarshalFailed = errors.New("json marshal failed") ErrUnmarshalFailed = errors.New("json unmarshal failed") )
预定义错误 - 序列化相关
Functions ¶
This section is empty.
Types ¶
type LogContext ¶
LogContext 日志上下文
func (*LogContext) WithModule ¶
func (c *LogContext) WithModule(module, operation string) logx.Logger
WithModule 创建带模块和操作的日志记录器
type PrefixWatchCallback ¶
PrefixWatchCallback 前缀监听回调函数类型 用于处理某个前缀下的键值变更事件
type WatchCallback ¶
type WatchCallback func(event *WatchEvent) error
WatchCallback 监听回调函数类型 用于处理单个键值变更事件
type WatchConfig ¶
WatchConfig 监听配置项 用于定义需要监听的键及其绑定的结构体类型
type WatchEvent ¶
WatchEvent 监听事件
Click to show internal directories.
Click to hide internal directories.