Documentation ¶
Overview ¶
Package config 基于配置导表功能实现的配置加载及刷新功能
Index ¶
- func Init(loadDir string, loadHandle LoadHandle, refreshHandle RefreshHandle)
- func Load()
- func OnConfigRefreshEvent()
- func Refresh()
- func RegConfigRefreshEvent(handle RefreshEventHandle)
- func StopTickerLoad()
- func WithTickerLoad(ticker *timer.Ticker, interval time.Duration)
- type LoadHandle
- type RefreshEventHandle
- type RefreshHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(loadDir string, loadHandle LoadHandle, refreshHandle RefreshHandle)
Init 配置初始化
func OnConfigRefreshEvent ¶
func OnConfigRefreshEvent()
func RegConfigRefreshEvent ¶
func RegConfigRefreshEvent(handle RefreshEventHandle)
RegConfigRefreshEvent 当配置刷新时将立即执行被注册的事件处理函数
Types ¶
type LoadHandle ¶
LoadHandle 配置加载处理函数
Click to show internal directories.
Click to hide internal directories.