config

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2017 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.4.0"

VERSION sets the agent version here.

Variables

This section is empty.

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 NewConfig

func NewConfig(confPath string) (*Config, error)

NewConfig creates a new instance of Config.

func (*Config) GetForwarderAddr

func (c *Config) GetForwarderAddr() string

GetForwarderAddr gets the address that Forwarder listening to.

func (*Config) GetForwarderAddrWithScheme

func (c *Config) GetForwarderAddrWithScheme() string

GetForwarderAddrWithScheme gets the address of Forwarder with scheme prefix.

func (*Config) GetHostname

func (c *Config) GetHostname() string

GetHostname gets the hostname from os itself if not set in the agent configuration.

func (*Config) GetStatsdAddr

func (c *Config) GetStatsdAddr() string

GetStatsdAddr gets the address that Statsd listening to.

func (*Config) InitializeLogging

func (c *Config) InitializeLogging() error

InitializeLogging initializes logging level and output according to the agent configuration.

func (*Config) LoadConfig

func (c *Config) LoadConfig(confPath string) error

LoadConfig XXX

func (*Config) PluginNames

func (c *Config) PluginNames() []string

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"`
	Proxy           string `toml:"proxy"`
	BindHost        string `toml:"bind_host"`
	ListenPort      int    `toml:"listen_port"`
	StatsdPort      int    `toml:"statsd_port"`
	NonLocalTraffic bool   `toml:"non_local_traffic"`
}

GlobalConfig XXX

type LoggingConfig

type LoggingConfig struct {
	LogLevel string `toml:"log_level"`
	LogFile  string `toml:"log_file"`
}

LoggingConfig XXX

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL