Documentation ¶
Overview ¶
Package cli created on 2017/6/22.
Index ¶
- Constants
- func NewCommandlineConfigSource() source.ConfigSource
- type Source
- func (cli *Source) AddDimensionInfo(labels map[string]string) error
- func (cli *Source) Cleanup() error
- func (cli *Source) Delete(key string) error
- func (cli *Source) GetConfigurationByKey(key string) (interface{}, error)
- func (cli *Source) GetConfigurations() (map[string]interface{}, error)
- func (cli *Source) GetPriority() int
- func (*Source) GetSourceName() string
- func (cli *Source) Set(key string, value interface{}) error
- func (cli *Source) SetPriority(priority int)
- func (*Source) Watch(callback source.EventHandler) error
Constants ¶
View Source
const (
Name = "CommandlineSource"
)
const
Variables ¶
This section is empty.
Functions ¶
func NewCommandlineConfigSource ¶
func NewCommandlineConfigSource() source.ConfigSource
NewCommandlineConfigSource defines a function used for creating configuration source
Types ¶
type Source ¶
type Source struct { sync.RWMutex Configurations map[string]interface{} // contains filtered or unexported fields }
Source is source for all configuration
func (*Source) AddDimensionInfo ¶
AddDimensionInfo is none function
func (*Source) GetConfigurationByKey ¶
GetConfigurationByKey gets required configuration for matching key
func (*Source) GetConfigurations ¶
GetConfigurations get configuration
func (*Source) GetPriority ¶
GetPriority gets the priority of a configuration
func (*Source) GetSourceName ¶
GetSourceName gets the source's name of a configuration
func (*Source) SetPriority ¶
SetPriority custom priority
Click to show internal directories.
Click to hide internal directories.