config

package
v0.0.0-...-1d9613f Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Datadog = viper.New()

Datadog is the global configuration object

Functions

func BindEnvAndSetDefault

func BindEnvAndSetDefault(key string, val interface{})

BindEnvAndSetDefault sets the default value for a config parameter, and adds an env binding

func FileUsedDir

func FileUsedDir() string

FileUsedDir returns the absolute path to the folder containing the config file used to populate the registry

func GetMultipleEndpoints

func GetMultipleEndpoints() (map[string][]string, error)

GetMultipleEndpoints returns the api keys per domain specified in the main agent config

func GetSyslogURI

func GetSyslogURI() string

GetSyslogURI returns the configured/default syslog uri

func IsContainerized

func IsContainerized() bool

IsContainerized returns whether the Agent is running on a Docker container

func IsKubernetes

func IsKubernetes() bool

IsKubernetes returns whether the Agent is running on a kubernetes cluster

func SetupLogger

func SetupLogger(logLevel, logFile, uri string, rfc, tls bool, pem string, logToConsole bool, jsonFormat bool) error

SetupLogger sets up the default logger

Types

type ConfigurationProviders

type ConfigurationProviders struct {
	Name        string `mapstructure:"name"`
	Polling     bool   `mapstructure:"polling"`
	TemplateURL string `mapstructure:"template_url"`
	TemplateDir string `mapstructure:"template_dir"`
	Username    string `mapstructure:"username"`
	Password    string `mapstructure:"password"`
	CAFile      string `mapstructure:"ca_file"`
	CAPath      string `mapstructure:"ca_path"`
	CertFile    string `mapstructure:"cert_file"`
	KeyFile     string `mapstructure:"key_file"`
	Token       string `mapstructure:"token"`
}

ConfigurationProviders helps unmarshalling `config_providers` config param

type ErrorLogWriter

type ErrorLogWriter struct{}

ErrorLogWriter is a Writer that logs all written messages with the global seelog logger at an error level

func (*ErrorLogWriter) Write

func (s *ErrorLogWriter) Write(p []byte) (n int, err error)

type Listeners

type Listeners struct {
	Name string `mapstructure:"name"`
}

Listeners helps unmarshalling `listeners` config param

type MetadataProviders

type MetadataProviders struct {
	Name     string        `mapstructure:"name"`
	Interval time.Duration `mapstructure:"interval"`
}

MetadataProviders helps unmarshalling `metadata_providers` config param

type Proxy

type Proxy struct {
	HTTP    string   `mapstructure:"http"`
	HTTPS   string   `mapstructure:"https"`
	NoProxy []string `mapstructure:"no_proxy"`
}

Proxy represents the configuration for proxies in the agent

type SyslogReceiver

type SyslogReceiver struct {
	// contains filtered or unexported fields
}

SyslogReceiver implements seelog.CustomReceiver

func (*SyslogReceiver) AfterParse

func (s *SyslogReceiver) AfterParse(initArgs log.CustomReceiverInitArgs) error

AfterParse parses the receiver configuration

func (*SyslogReceiver) Close

func (s *SyslogReceiver) Close() error

Close is a NOP in current implementation

func (*SyslogReceiver) Flush

func (s *SyslogReceiver) Flush()

Flush is a NOP in current implementation

func (*SyslogReceiver) ReceiveMessage

func (s *SyslogReceiver) ReceiveMessage(message string, level log.LogLevel, context log.LogContextInterface) error

ReceiveMessage process current log message

Jump to

Keyboard shortcuts

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