Documentation ¶
Overview ¶
copied from github.com/elastic/beats
Index ¶
- func IsStrictPerms() bool
- func NewFlagOverwrite(set *flag.FlagSet, config *Config, name, path, def, usage string) *string
- type ClusterConfig
- type Config
- func LoadFile(path string) (*Config, error)
- func LoadFiles(paths ...string) (*Config, error)
- func MergeConfigs(cfgs ...*Config) (*Config, error)
- func NewConfig() *Config
- func NewConfigFrom(from interface{}) (*Config, error)
- func NewConfigWithYAML(in []byte, source string) (*Config, error)
- func NewFlagConfig(set *flag.FlagSet, def *Config, name string, usage string) *Config
- func (c *Config) Bool(name string, idx int) (bool, error)
- func (c *Config) Child(name string, idx int) (*Config, error)
- func (c *Config) CountField(name string) (int, error)
- func (c *Config) Enabled() bool
- func (c *Config) Float(name string, idx int) (float64, error)
- func (c *Config) GetFields() []string
- func (c *Config) HasField(name string) bool
- func (c *Config) Int(name string, idx int) (int64, error)
- func (c *Config) IsArray() bool
- func (c *Config) IsDict() bool
- func (c *Config) Merge(from interface{}) error
- func (c *Config) Path() string
- func (c *Config) PathOf(field string) string
- func (c *Config) SetBool(name string, idx int, value bool) error
- func (c *Config) SetChild(name string, idx int, value *Config) error
- func (c *Config) SetFloat(name string, idx int, value float64) error
- func (c *Config) SetInt(name string, idx int, value int64) error
- func (c *Config) SetString(name string, idx int, value string) error
- func (c *Config) String(name string, idx int) (string, error)
- func (c *Config) Unpack(to interface{}) error
- type ConfigNamespace
- type LoggingConfig
- type MatchRule
- type MustMatchRule
- type MustNotMatchRule
- type NetworkConfig
- type NodeConfig
- type PathConfig
- type RuntimeConfig
- type ShouldMatchRule
- type SystemConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStrictPerms ¶
func IsStrictPerms() bool
IsStrictPerms returns true if strict permission checking on config files is enabled.
Types ¶
type ClusterConfig ¶
type Config ¶
type Config ucfg.Config
Config object to store hierarchical configurations into. See https://godoc.org/github.com/elastic/go-ucfg#Config
func MergeConfigs ¶
func NewConfigFrom ¶
func NewFlagConfig ¶
type ConfigNamespace ¶
ConfigNamespace storing at most one configuration section by name and sub-section.
func (*ConfigNamespace) Config ¶
func (ns *ConfigNamespace) Config() *Config
Config return the sub-configuration section if a section has been set.
func (*ConfigNamespace) IsSet ¶
func (ns *ConfigNamespace) IsSet() bool
IsSet returns true if a sub-configuration section has been set.
func (*ConfigNamespace) Name ¶
func (ns *ConfigNamespace) Name() string
Name returns the configuration sections it's name if a section has been set.
func (*ConfigNamespace) Validate ¶
func (ns *ConfigNamespace) Validate() error
Validate checks at most one sub-namespace being set.
type LoggingConfig ¶
type MustMatchRule ¶
type MustMatchRule struct {
*MatchRule
}
type MustNotMatchRule ¶
type MustNotMatchRule struct {
*MatchRule
}
type NetworkConfig ¶
type NetworkConfig struct {
Host string `config:"host"`
}
type NodeConfig ¶
type NodeConfig struct {
Name string `config:"name"`
}
type PathConfig ¶
type RuntimeConfig ¶
type RuntimeConfig struct {
Modules []*Config `config:"modules"`
}
type ShouldMatchRule ¶
type ShouldMatchRule struct {
*MatchRule
}
type SystemConfig ¶
type SystemConfig struct { ConfigFile string ClusterConfig ClusterConfig `config:"cluster"` NetworkConfig NetworkConfig `config:"network"` NodeConfig NodeConfig `config:"node"` PathConfig PathConfig `config:"path"` APIBinding string `config:"api_bind"` HttpBinding string `config:"http_bind"` ClusterBinding string `config:"cluster_bind"` AllowMultiInstance bool `config:"multi_instance"` TLSEnabled bool `config:"tls_enabled"` }
high priority config, init from the environment or startup, can't be changed on the fly, need to restart
func (*SystemConfig) GetDataDir ¶
func (this *SystemConfig) GetDataDir() string