config

package
v0.0.0-...-cd47023 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.5.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
	// contains filtered or unexported fields
}

Config represents efc-agent's configuration file.

func NewConfig

func NewConfig(confPath string, pluginFilters []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