Documentation ¶
Index ¶
- func GetBootstrapConfig() *conf.Bootstrap
- func LoadBootstrapConfig(configPath string) error
- func LoadRemoteConfigSourceConfigs(configPath string) (error, *conf.RemoteConfig)
- func NewConfigProvider(configPath string) config.Config
- func NewFileConfigSource(filePath string) config.Source
- func NewRemoteConfigSource(c *conf.RemoteConfig) config.Source
- func RegisterConfig(c interface{})
- type CommandFlags
- type ServiceInfo
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBootstrapConfig ¶
func LoadBootstrapConfig ¶
LoadBootstrapConfig loader boot configuration
func LoadRemoteConfigSourceConfigs ¶
func LoadRemoteConfigSourceConfigs(configPath string) (error, *conf.RemoteConfig)
LoadRemoteConfigSourceConfigs load local configuration from remote configuration source
func NewConfigProvider ¶
NewConfigProvider create a configuration provider
func NewFileConfigSource ¶
NewFileConfigSource create a local file configuration source
func NewRemoteConfigSource ¶
func NewRemoteConfigSource(c *conf.RemoteConfig) config.Source
NewRemoteConfigSource create a remote configuration source
Types ¶
type CommandFlags ¶
type CommandFlags struct { Conf string // Boot configuration file path, default is: ../../configs Env string // Development environment: dev, debug... ConfigHost string // Remote configuration server address ConfigType string // Remote configuration server type Daemon bool // Whether to convert to daemon process }
CommandFlags Command parameters
func NewCommandFlags ¶
func NewCommandFlags() *CommandFlags
func (*CommandFlags) Init ¶
func (f *CommandFlags) Init()
type ServiceInfo ¶
func NewServiceInfo ¶
func NewServiceInfo(name, version, id string) *ServiceInfo
func (*ServiceInfo) GetInstanceId ¶
func (s *ServiceInfo) GetInstanceId() string
func (*ServiceInfo) SetMataData ¶
func (s *ServiceInfo) SetMataData(k, v string)
func (*ServiceInfo) SetName ¶
func (s *ServiceInfo) SetName(name string)
func (*ServiceInfo) SetVersion ¶
func (s *ServiceInfo) SetVersion(version string)
Click to show internal directories.
Click to hide internal directories.