Documentation ¶
Overview ¶
Package legacy contains the logic to convert the old agent configuration
Index ¶
- func BuildProxySettings(agentConfig Config) (map[string]string, error)
- func FromAgentConfig(agentConfig Config, converter *ConfigConverter) error
- func ImportDockerConf(_, _ string, _ bool, _ *ConfigConverter) error
- func ImportKubernetesConf(src, dst string, overwrite bool, converter *ConfigConverter) error
- func ImportTraceAgentConfig(datadogConfPath, traceAgentConfPath string) (bool, error)
- type Config
- type ConfigConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProxySettings ¶
BuildProxySettings returns a map with http/https proxies based on old config
func FromAgentConfig ¶
func FromAgentConfig(agentConfig Config, converter *ConfigConverter) error
FromAgentConfig reads the old agentConfig configuration, converts and merges the values into the current configuration object
func ImportDockerConf ¶
func ImportDockerConf(_, _ string, _ bool, _ *ConfigConverter) error
ImportDockerConf is a place holder if the agent is built without the docker flag
func ImportKubernetesConf ¶
func ImportKubernetesConf(src, dst string, overwrite bool, converter *ConfigConverter) error
ImportKubernetesConf reads the configuration from the kubernetes check (agent5) and create the configuration for the new kubelet check (agent 6) and moves relevant options to datadog.yaml
func ImportTraceAgentConfig ¶
ImportTraceAgentConfig reads `datadog.conf` and returns an ini config object, ready to be dumped to a .ini file.
Types ¶
type Config ¶
Config is a simple key/value representation of the legacy agentConfig dictionary
func GetAgentConfig ¶
GetAgentConfig reads `datadog.conf` and returns a map that contains the same values as the agentConfig dictionary returned by `get_config()` in config.py
type ConfigConverter ¶
ConfigConverter is used in the legacy package to convert A5 config to A6
func NewConfigConverter ¶
func NewConfigConverter() *ConfigConverter
NewConfigConverter is creating and returning a config converter
func (*ConfigConverter) Set ¶
func (c *ConfigConverter) Set(key string, value interface{})
Set is used for setting configuration from A5 config