Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConfig ¶
type IConfig interface { // ReloadConfig 加载配置 被动通知 // 从配置源加载到内存 ReloadConfig() error // Scan 将配置扫描到结构体 Scan(v any) // GetString 支持json/yaml通过键名获取值 不支持数组 GetString(key string) string // Subscribe 用户订阅Watch事件 Subscribe(key string, ch chan struct{}) // UnSubscribe 用户取消订阅 UnSubscribe(key string) // Close 关闭 Close() }
IConfig 配置接口 功能如下: 1.热更新 主动轮询/被动通知 2.通过key获取配置 3.订阅配置变化
type ReloadConfigInterface ¶ added in v0.0.3
type ReloadConfigInterface interface { // ReloadConfig 实现配置重载功能 ReloadConfig() error }
ReloadConfigInterface 重载配置Interface
Click to show internal directories.
Click to hide internal directories.