Documentation
¶
Index ¶
- type ConfigurationManager
- func (cm *ConfigurationManager) GetAllPaths() ([]string, error)
- func (cm *ConfigurationManager) GetAs(path string, target interface{}) error
- func (cm *ConfigurationManager) GetConfig() *types.ServiceConfig
- func (cm *ConfigurationManager) GetRawData() map[string]interface{}
- func (cm *ConfigurationManager) GetValue(path string, defaultValue interface{}) interface{}
- func (cm *ConfigurationManager) IsRunning() bool
- func (cm *ConfigurationManager) Load() error
- func (cm *ConfigurationManager) Start() error
- func (cm *ConfigurationManager) Stop() error
- type Loader
- func (l *Loader) Defaults() *types.ServiceConfig
- func (l *Loader) IsRunning() bool
- func (l *Loader) LoadFromFile(ctx context.Context, configPath string) (*types.ServiceConfig, *map[string]interface{}, error)
- func (l *Loader) ReadFileWithTimeout(ctx context.Context, filepath string) ([]byte, error)
- func (l *Loader) Start() error
- func (l *Loader) Stop() error
- func (l *Loader) ValidateConfig(config *types.ServiceConfig) error
- type LoaderState
- type Parser
- func (p *Parser) GetAllPaths() ([]string, error)
- func (p *Parser) GetAs(path string, target interface{}) error
- func (p *Parser) GetValue(path string, defaultValue interface{}) interface{}
- func (p *Parser) IsRunning() bool
- func (p *Parser) Start() error
- func (p *Parser) Stop() error
- func (p *Parser) ValidatePath(path string) error
- type ParserState
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationManager ¶
type ConfigurationManager struct {
// contains filtered or unexported fields
}
func NewConfigurationManager ¶
func NewConfigurationManager( ctx context.Context, configPath string, ) (*ConfigurationManager, error)
func (*ConfigurationManager) GetAllPaths ¶
func (cm *ConfigurationManager) GetAllPaths() ([]string, error)
func (*ConfigurationManager) GetAs ¶
func (cm *ConfigurationManager) GetAs(path string, target interface{}) error
func (*ConfigurationManager) GetConfig ¶
func (cm *ConfigurationManager) GetConfig() *types.ServiceConfig
func (*ConfigurationManager) GetRawData ¶
func (cm *ConfigurationManager) GetRawData() map[string]interface{}
func (*ConfigurationManager) GetValue ¶
func (cm *ConfigurationManager) GetValue(path string, defaultValue interface{}) interface{}
func (*ConfigurationManager) IsRunning ¶
func (cm *ConfigurationManager) IsRunning() bool
func (*ConfigurationManager) Load ¶
func (cm *ConfigurationManager) Load() error
func (*ConfigurationManager) Start ¶
func (cm *ConfigurationManager) Start() error
func (*ConfigurationManager) Stop ¶
func (cm *ConfigurationManager) Stop() error
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) Defaults ¶
func (l *Loader) Defaults() *types.ServiceConfig
func (*Loader) LoadFromFile ¶
func (*Loader) ReadFileWithTimeout ¶
func (*Loader) ValidateConfig ¶
func (l *Loader) ValidateConfig(config *types.ServiceConfig) error
type LoaderState ¶
type LoaderState int32
const ( LoaderStateStopped LoaderState = iota LoaderStateStarting LoaderStateRunning LoaderStateStopping )
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) GetAllPaths ¶
func (*Parser) ValidatePath ¶
type ParserState ¶
type ParserState int32
const ( ParserStateStopped ParserState = iota ParserStateStarting ParserStateRunning ParserStateStopping )
Click to show internal directories.
Click to hide internal directories.