package docker

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

Provides global docker information.

Handler for Docker containers.

Index

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")

Functions

func APIVersion

func APIVersion() ([]int, error)

func APIVersionString

func APIVersionString() string

func Client

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

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

func ContainerNameToDockerId

func ContainerNameToDockerId(name string) string

Returns the Docker ID from the full container name.

func Images

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

func Register

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

Register root container before running this function!

func RootDir

func RootDir() string

func Status

func Status() (v1.DockerStatus, error)

func StatusFromDockerInfo

func StatusFromDockerInfo(dockerInfo dockertypes.Info) v1.DockerStatus

func ValidateInfo

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 Version

func Version() ([]int, error)

func VersionString

func VersionString() string

Source Files

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

Version
v0.27.3
Published
Nov 22, 2017
Platform
darwin/amd64
Imports
30 packages
Last checked
1 day ago

Tools for package owners.