Documentation
¶
Index ¶
- Variables
- func DebVersion(debName string) string
- func DebVersionByService(name string) string
- func GetRemoteConf(ctx context.Context, cfg config.FilesConf)
- func MD5ConfigFiles() (md5 string, confFiles []string)
- func MD5Files(files ...string) (md5 string)
- func Main()
- func Register(stage Stage, sf ...Pipeline)
- func RegisterWithContext(stage Stage, sf ...ContextFunc)
- func Run()
- func SetExtraWatcherFiles(confFile ...string)
- func Start()
- func Stop()
- func WaitUntilNtpdate(timeout time.Duration) bool
- type ContextFunc
- type Pipeline
- type Stage
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FlagParser 可由 App 指定自定义的 flag FlagParser = flagParse Daemon bool Version bool )
View Source
var ( // ConfigModTime 公共配置文件集最后修改时间 ConfigModTime time.Time // ConfigLoadTime 配置文件最后加载时间 ConfigLoadTime time.Time // MainWatcherKey 主程序二进制和配置文件监控器标识 MainWatcherKey = "__PKG_MAIN_BIN_WATCHER__" MainWatcherConfKey = "__PKG_MAIN_CONFIG_WATCHER__" )
Functions ¶
func DebVersionByService ¶
DebVersionByService ff-app.service
func GetRemoteConf ¶
GetRemoteConf 定时获取远端配置, 配合 RemotePipelines 使用 注: 当主配置变化时, 该函数会退出并重新运行
func MD5ConfigFiles ¶
MD5ConfigFiles 配置文件 MD5, 有变化时重载系统配置项
func RegisterWithContext ¶
func RegisterWithContext(stage Stage, sf ...ContextFunc)
func SetExtraWatcherFiles ¶ added in v0.8.1
func SetExtraWatcherFiles(confFile ...string)
SetExtraWatcherFiles 设置额外的文件到内容变化监控列表
func WaitUntilNtpdate ¶ added in v0.6.10
WaitUntilNtpdate 等待, 直到第一次时间同步成功
Types ¶
type ContextFunc ¶
Click to show internal directories.
Click to hide internal directories.