Documentation ¶
Index ¶
- Constants
- func CopyFile(src, dst string) error
- func CopyFileAll(src, dst string) error
- func DetectCloudProvider()
- func EnsureParentDirsExist(p string) error
- func Fqdn(hostname string) string
- func GetAgentNetworkMode() (string, error)
- func GetAgentUTSMode() (containers.UTSMode, error)
- func GetGoRoutinesDump() (string, error)
- func GetHostname() (string, error)
- func GetJSONSerializableMap(m interface{}) interface{}
- func GetNetworkID() (string, error)
- func HTTPHeaders() map[string]string
- func SortUniqInPlace(elements []string) []string
- type BiMap
- func (b *BiMap) AddKV(k, v interface{}) error
- func (b *BiMap) GetKV(key interface{}) (interface{}, error)
- func (b *BiMap) GetKVBimap(key interface{}) (interface{}, error)
- func (b *BiMap) GetKVReverse(key interface{}) (interface{}, error)
- func (b *BiMap) Keys() []interface{}
- func (b *BiMap) Values() []interface{}
- type HostnameData
- type NamedPipe
- type Stat
- type Stats
- type UnixNamedPipe
Constants ¶
const HostnameProviderConfiguration = "configuration"
HostnameProviderConfiguration is the key for the hostname provider associated to datadog.yaml
Variables ¶
This section is empty.
Functions ¶
func CopyFileAll ¶
CopyFileAll calls CopyFile, but will create necessary directories for `dst`.
func DetectCloudProvider ¶
func DetectCloudProvider()
DetectCloudProvider detects the cloud provider where the agent is running in order: * AWS ECS/Fargate * AWS EC2 * GCE * Azure * Alibaba
func EnsureParentDirsExist ¶
EnsureParentDirsExist makes a path immediately available for writing by creating the necessary parent directories.
func GetAgentNetworkMode ¶
GetAgentNetworkMode retrieves from Docker the network mode of the Agent container
func GetAgentUTSMode ¶
func GetAgentUTSMode() (containers.UTSMode, error)
GetAgentUTSMode retrieves from Docker the UTS mode of the Agent container
func GetGoRoutinesDump ¶
GetGoRoutinesDump returns the stack trace of every Go routine of a running Agent.
func GetHostname ¶
GetHostname retrieves the host name from GetHostnameData
func GetJSONSerializableMap ¶
func GetJSONSerializableMap(m interface{}) interface{}
GetJSONSerializableMap returns a JSON serializable map from a raw map
func GetNetworkID ¶
GetNetworkID retrieves the network_id which can be used to improve network connection resolution. This can be configured or detected. The following sources will be queried: * configuration * GCE * EC2
func HTTPHeaders ¶
HTTPHeaders returns a http headers including various basic information (User-Agent, Content-Type...).
func SortUniqInPlace ¶
SortUniqInPlace sorts and remove duplicates from elements in place The returned slice is a subslice of elements
Types ¶
type BiMap ¶
type BiMap struct {
// contains filtered or unexported fields
}
BiMap provides a bidirectional map of keys and values.
func (*BiMap) GetKVBimap ¶
GetKVBimap looks for the provided key both for keys and values in the map.
The first occurrence will be returned.
func (*BiMap) GetKVReverse ¶
GetKVReverse gets key provided the value.
type HostnameData ¶
HostnameData contains hostname and the hostname provider
func GetHostnameData ¶
func GetHostnameData() (HostnameData, error)
GetHostnameData retrieves the host name for the Agent and hostname provider, trying to query these environments/api, in order: * GCE * Docker * kubernetes * os * EC2
type NamedPipe ¶
type NamedPipe interface { Open() error Ready() bool Read(b []byte) (int, error) Write(b []byte) (int, error) Close() error }
NamedPipe interface to NamedPipes (multi-platform)
type Stats ¶
type Stats struct { Aggregated chan Stat // contains filtered or unexported fields }
Stats type structure enabling statting facilities.
type UnixNamedPipe ¶
type UnixNamedPipe struct {
// contains filtered or unexported fields
}
UnixNamedPipe unix abstraction to named pipes
func NewUnixNamedPipe ¶
func NewUnixNamedPipe(path string) (*UnixNamedPipe, error)
NewUnixNamedPipe UnixNamedPipe constructor
func (*UnixNamedPipe) Open ¶
func (p *UnixNamedPipe) Open() error
Open opens named pipe - will create it if doesn't exist
func (*UnixNamedPipe) Ready ¶
func (p *UnixNamedPipe) Ready() bool
Ready is the pipe ready to read/write?
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
providers/windows
Package windows We need a file in this package as it's referenced by a file built on windows
|
Package windows We need a file in this package as it's referenced by a file built on windows |
Package ecs provides metadata collection when the Agent runs on the ECS platform
|
Package ecs provides metadata collection when the Agent runs on the ECS platform |
metadata
Package metadata provides clients for Metadata APIs exposed by the ECS agent.
|
Package metadata provides clients for Metadata APIs exposed by the ECS agent. |
Package executable provides information on the executable that started the process
|
Package executable provides information on the executable that started the process |
validate
Package validate provides hostname validation helpers
|
Package validate provides hostname validation helpers |