Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DockerEntityPrefix is the entity prefix for docker containers
DockerEntityPrefix = "docker://"
)
Variables ¶
View Source
var ( ErrAlreadySubscribed = errors.New("already subscribed") ErrNotSubscribed = errors.New("not subscribed") ErrEventTimeout = errors.New("timeout on event sending, re-subscribe") )
Errors client might receive
View Source
var ( // ErrNotImplemented is the "not implemented" error given by `gopsutil` when an // OS doesn't support and API. Unfortunately it's in an internal package so // we can't import it so we'll copy it here. ErrNotImplemented = errors.New("not implemented yet") // ErrDockerNotAvailable is returned if Docker is not running on the current machine. // We'll use this when configuring the DockerUtil so we don't error on non-docker machines. ErrDockerNotAvailable = errors.New("docker not available") // ErrDockerNotCompiled is returned if docker support is not compiled in. // User classes should handle that case as gracefully as possible. ErrDockerNotCompiled = errors.New("docker support not compiled in") )
Functions ¶
func ContainerIDToEntityName ¶
ContainerIDToEntityName returns a prefixed entity name from a container ID
func FindRancherIPInLabels ¶
FindRancherIPInLabels looks for the `io.rancher.container.ip` label and parses it. Rancher 1.x containers don't have docker networks as the orchestrator provides its own CNI.
func GetTags ¶
GetTags returns tags that are automatically added to metrics and events on a host that is running docker.
func HostnameProvider ¶
HostnameProvider docker implementation for the hostname provider
Types ¶
type ContainerEvent ¶
type ContainerEvent struct { ContainerID string ContainerName string ImageName string Action string Timestamp time.Time Attributes map[string]string }
ContainerEvent describes an event from the docker daemon
func (*ContainerEvent) ContainerEntityName ¶
func (ev *ContainerEvent) ContainerEntityName() string
ContainerEntityName returns the event's container as a tagger entity name
Click to show internal directories.
Click to hide internal directories.