Documentation
¶
Index ¶
- Variables
- func BindEnvAndSetDefault(key string, val interface{})
- func FileUsedDir() string
- func GetMultipleEndpoints() (map[string][]string, error)
- func GetSyslogURI() string
- func IsContainerized() bool
- func IsKubernetes() bool
- func SetupLogger(logLevel, logFile, uri string, rfc, tls bool, pem string, logToConsole bool, ...) error
- type ConfigurationProviders
- type ErrorLogWriter
- type Listeners
- type MetadataProviders
- type Proxy
- type SyslogReceiver
Constants ¶
This section is empty.
Variables ¶
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 ¶
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
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
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