package docker
import "github.com/google/cadvisor/container/docker"
Provides global docker information.
Handler for Docker containers.
Index ¶
- Constants
- Variables
- func APIVersion() ([]int, error)
- func APIVersionString() (string, error)
- func Client() (*dclient.Client, error)
- func ContainerNameToDockerId(name string) string
- func Images() ([]v1.DockerImage, error)
- func NewPlugin() container.Plugin
- func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error
- func RootDir() string
- func SetTimeout(timeout time.Duration)
- func Status() (v1.DockerStatus, error)
- func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error)
- func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
- func ValidateInfo() (*dockertypes.Info, error)
- func VersionString() (string, error)
Constants ¶
const DockerNamespace = "docker"
The namespace under which Docker aliases are unique.
Variables ¶
Functions ¶
func APIVersion ¶
func APIVersionString ¶
func Client ¶
Client creates a Docker API client based on the given Docker flags
func ContainerNameToDockerId ¶
Returns the Docker ID from the full container name.
func Images ¶
func Images() ([]v1.DockerImage, error)
func NewPlugin ¶
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 ¶
func Status ¶
func Status() (v1.DockerStatus, error)
func StatusFromDockerInfo ¶
func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error)
func StatusWithContext ¶
func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
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 VersionString ¶
Source Files ¶
client.go docker.go factory.go handler.go plugin.go
Directories ¶
Path | Synopsis |
---|---|
container/docker/install | The install package registers docker.NewPlugin() as the "docker" container provider when imported |
container/docker/utils |
- Version
- v0.38.8
- Published
- Feb 18, 2021
- Platform
- darwin/amd64
- Imports
- 27 packages
- Last checked
- 1 day ago –
Tools for package owners.