cadvisor: Index | Files | Directories

package containerd

import ""

This code has been taken from containerd repo to avoid large library import

Handler for containerd containers.


Package Files

client.go factory.go grpc.go handler.go plugin.go


var ArgContainerdEndpoint = flag.String("containerd", "/run/containerd/containerd.sock", "containerd endpoint")
var ArgContainerdNamespace = flag.String("containerd-namespace", "", "containerd namespace")

func ContainerNameToContainerdID Uses

func ContainerNameToContainerdID(name string) string

Returns the containerd ID from the full container name.

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!

type ContainerdClient Uses

type ContainerdClient interface {
    LoadContainer(ctx context.Context, id string) (*containers.Container, error)
    TaskPid(ctx context.Context, id string) (uint32, error)
    Version(ctx context.Context) (string, error)

func Client Uses

func Client(address, namespace string) (ContainerdClient, error)

Client creates a containerd client


installThe install package registers containerd.NewPlugin() as the "containerd" container provider when imported

Package containerd imports 29 packages (graph) and is imported by 25 packages. Updated 2020-05-29. Refresh now. Tools for package owners.