docker

package
v0.44.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Provides global docker information.

Handler for Docker containers.

Index

Constants

View Source
const DockerNamespace = "docker"

The namespace under which Docker aliases are unique.

Variables

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

Functions

func APIVersion added in v0.26.0

func APIVersion() ([]int, error)

func APIVersionString added in v0.26.0

func APIVersionString() (string, error)

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 added in v0.23.1

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

func NewPlugin added in v0.34.0

func NewPlugin() container.Plugin

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

func Register

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

Register root container before running this function!

func RootDir

func RootDir() string

func SetTimeout added in v0.29.0

func SetTimeout(timeout time.Duration)

func Status added in v0.23.1

func Status() (v1.DockerStatus, error)

func StatusFromDockerInfo added in v0.26.0

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

func StatusWithContext added in v0.29.0

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

func ValidateInfo added in v0.23.0

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 added in v0.23.1

func VersionString() (string, error)

Types

This section is empty.

Directories

Path Synopsis
The install package registers docker.NewPlugin() as the "docker" container provider when imported
The install package registers docker.NewPlugin() as the "docker" container provider when imported

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL