Documentation
¶
Overview ¶
Package apolloconfig APOLLO配置加载器
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init() box.BuildOption
Types ¶
type ApolloLogger ¶
type ApolloLogger struct {
// contains filtered or unexported fields
}
func (*ApolloLogger) Log ¶
func (al *ApolloLogger) Log(kv ...any)
type ConfigLoader ¶
type ConfigLoader struct { AppId string `flag:"appid" default:"" usage:"apollo appid" validate:"required"` Cluster string `flag:"cluster" default:"" usage:"apollo cluster" validate:"required"` Addr string `flag:"addr" default:"" usage:"apollo addr" validate:"required"` Namespace string `` /* 137-byte string literal not displayed */ CachePath string `flag:"cache" default:"./configs/apollo_system.json" usage:"apollo cache path"` SyncTimeout int `flag:"sync_timeout" default:"5" usage:"apollo sync timeout"` Secret string `flag:"secret" default:"" usage:"apollo secret" validate:"required"` // contains filtered or unexported fields }
func NewConfigLoader ¶
func NewConfigLoader() *ConfigLoader
func (*ConfigLoader) Load ¶
func (cl *ConfigLoader) Load(ctx context.Context, set func([]box.ConfigItem)) error
Click to show internal directories.
Click to hide internal directories.