package
0.9.0
Repository: https://github.com/datadog/datadog-agent.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddressFromNetIP returns an Address from a provided net.IP.
AddressFromString creates an Address using the string representation of an v4 IP.
ExtractContainerRateMetric extracts relevant rate values from a container list for later reuse, while reducing memory usage to only the needed fields.
GetContainers returns containers found on the machine GetContainers autodetects the best backend from available sources if the users don't specify the preferred container sources.
GetCurrentIno returns the ino number for the current network namespace.
GetDockerSocketPath is only for exposing the sockpath out of the module.
GetEnv retrieves the environment variable key.
GetInoForNs gets the inode number for the given network namespace.
GetNetNamespaceFromPid gets the network namespace for a given `pid`.
GetNetNamespaces returns a list of network namespaces on the machine.
GetNetNsInoFromPid gets the network namespace inode number for the given `pid`.
GetProcRoot retrieves the current procfs dir we should use.
GetRootNetNamespace gets the root network namespace.
GetSysRoot retrieves the current sysfs dir we should use.
HandleSignals tells us whether we should exit.
HostProc returns the location of a host's procfs.
HostSys returns the location of a host's /sys.
NetIPFromAddress returns a net.IP from an Address.
NewLogLimit creates a LogLimit where shouldLog will return true the first N times it is called, and will return true once every interval thereafter.
PathExists returns a boolean indicating if the given path exists on the file system.
ReadLines reads contents from a file and splits them by new lines.
SetContainerSources allows config to force one or multiple container sources.
StringInSlice returns true if the given searchString is in the given slice, false otherwise.
ToLowHigh converts an address into a pair of uint64 numbers.
V4Address creates an Address using the uint32 representation of an v4 IP.
V4AddressFromBytes creates an Address using the byte representation of an v4 IP.
V6Address creates an Address using the uint128 representation of an v6 IP.
V6AddressFromBytes creates an Address using the byte representation of an v6 IP.
WithAllProcs will execute `fn` for every pid under procRoot.
WithNS executes the given function in the given network namespace, and then switches back to the previous namespace.
WithRootNS executes a function within root network namespace and then switch back to the previous namespace.

# Variables

ErrNotImplemented is the "not implemented" error given by `gopsutil` when an OS doesn't support and API.
IPBufferPool is meant to be used in conjunction with `NetIPFromAddress`.
NullContainerRates can be safely used for containers that have no previous rate values stored (new containers).

# Structs

ContainerRateMetrics holds previous values for a container, in order to compute rates.
LogLimit is a utility that can be used to avoid logging noisily.

# Interfaces

Address is an IP abstraction that is family (v4/v6) agnostic.

# Type aliases

SSBytes implements the sort.Interface for the [][]byte type.