Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) GetForwarderAddr() string
- func (c *Config) GetForwarderAddrWithScheme() string
- func (c *Config) GetHostname() string
- func (c *Config) GetStatsdAddr() string
- func (c *Config) InitializeLogging() error
- func (c *Config) LoadConfig(confPath string) error
- func (c *Config) PluginNames() []string
- type GlobalConfig
- type LoggingConfig
Constants ¶
View Source
const VERSION = "0.1.0"
VERSION sets the agent version here.
Variables ¶
View Source
var ( // DefaultConfig is the default top-level configuration. DefaultConfig = Config{ GlobalConfig: DefaultGlobalConfig, } // DefaultGlobalConfig is the default global configuration. DefaultGlobalConfig = GlobalConfig{ CiURL: "https://dc-cloud.oneapm.com", BindHost: "127.0.0.1", ListenPort: 10010, StatsdPort: 8251, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
GlobalConfig GlobalConfig `toml:"global"`
LoggingConfig LoggingConfig `toml:"logging"`
Plugins []*plugin.RunningPlugin
}
Config represents cloudinsight-agent's configuration file.
func (*Config) GetForwarderAddr ¶
GetForwarderAddr gets the address that Forwarder listening to.
func (*Config) GetForwarderAddrWithScheme ¶
GetForwarderAddrWithScheme gets the address of Forwarder with scheme prefix.
func (*Config) GetHostname ¶
GetHostname gets the hostname from os itself if not set in the agent configuration.
func (*Config) GetStatsdAddr ¶
GetStatsdAddr gets the address that Statsd listening to.
func (*Config) InitializeLogging ¶
InitializeLogging initializes logging level and output according to the agent configuration.
func (*Config) PluginNames ¶
PluginNames returns a list of strings of the configured Plugins.
type GlobalConfig ¶
type GlobalConfig struct {
CiURL string `toml:"ci_url"`
LicenseKey string `toml:"license_key"`
Hostname string `toml:"hostname"`
Tags string `toml:"tags"`
BindHost string `toml:"bind_host"`
ListenPort int `toml:"listen_port"`
StatsdPort int `toml:"statsd_port"`
}
GlobalConfig XXX
type LoggingConfig ¶
LoggingConfig XXX
Click to show internal directories.
Click to hide internal directories.