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 ...StageFunc)
- func RegisterWithContext(stage Stage, sf ...ContextFunc)
- func Run()
- type ContextFunc
- type Stage
- type StageFunc
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigModTime 公共配置文件集最后修改时间 ConfigModTime time.Time )
Functions ¶
func DebVersionByService ¶
DebVersionByService xunyou-nodeagent.service
func GetRemoteConf ¶
GetRemoteConf 定时获取远端配置, 配合 RemotePipelines 使用 注: 当主配置变化时, 该函数会退出并重新运行
func MD5ConfigFiles ¶
MD5ConfigFiles 配置文件 MD5, 有变化时重载
func RegisterWithContext ¶
func RegisterWithContext(stage Stage, sf ...ContextFunc)
Types ¶
type ContextFunc ¶
type Stage ¶
type Stage int
const ( // ConfigStage 程序配置加载, 最先执行 // pkg.config.Start() -> app.conf.Start() -> initPiplelines() ConfigStage Stage = iota // InitStage 程序初始化, 错误时退出程序 InitStage Stage = iota // RuntimeConfigStage 配置变化重载后最先执行 // pkg.config.Runtime() -> app.config.Runtime() -> runtimePipeline() RuntimeConfigStage // RuntimeStage 配置变化重载后运行 RuntimeStage // StopStage 退出程序时执行 StopStage // RemoteStage 执行定时远程获取配置 RemoteStage )
Click to show internal directories.
Click to hide internal directories.