cadvisor: github.com/google/cadvisor/container/docker Index | Files | Directories

package docker

import "github.com/google/cadvisor/container/docker"

Provides global docker information.

Handler for Docker containers.

Index

Package Files

client.go docker.go factory.go handler.go plugin.go

Constants

const DockerNamespace = "docker"

The namespace under which Docker aliases are unique.

Variables

var ArgDockerCA = flag.String("docker-tls-ca", "ca.pem", "path to trusted CA")
var ArgDockerCert = flag.String("docker-tls-cert", "cert.pem", "path to client certificate")
var ArgDockerEndpoint = flag.String("docker", "unix:///var/run/docker.sock", "docker endpoint")
var ArgDockerKey = flag.String("docker-tls-key", "key.pem", "path to private key")
var ArgDockerTLS = flag.Bool("docker-tls", false, "use TLS to connect to docker")

func APIVersion Uses

func APIVersion() ([]int, error)

func APIVersionString Uses

func APIVersionString() (string, error)

func Client Uses

func Client() (*dclient.Client, error)

Client creates a Docker API client based on the given Docker flags

func ContainerNameToDockerId Uses

func ContainerNameToDockerId(name string) string

Returns the Docker ID from the full container name.

func Images Uses

func Images() ([]v1.DockerImage, error)

func NewPlugin Uses

func NewPlugin() container.Plugin

NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin()

func Register Uses

func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error

Register root container before running this function!

func RootDir Uses

func RootDir() string

func SetTimeout Uses

func SetTimeout(timeout time.Duration)

func Status Uses

func Status() (v1.DockerStatus, error)

func StatusFromDockerInfo Uses

func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error)

func StatusWithContext Uses

func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)

func ValidateInfo Uses

func ValidateInfo() (*dockertypes.Info, error)

Checks whether the dockerInfo reflects a valid docker setup, and returns it if it does, or an error otherwise.

func VersionString Uses

func VersionString() (string, error)

Directories

PathSynopsis
installThe install package registers docker.NewPlugin() as the "docker" container provider when imported
utils

Package docker imports 27 packages (graph) and is imported by 482 packages. Updated 2020-05-22. Refresh now. Tools for package owners.