Documentation
¶
Index ¶
Constants ¶
View Source
const ( RuntimeContainerd Runtime = "containerd" DefaultSocketContainerd = "/run/containerd/containerd.sock" DefaultRuncRootContainerd = "/run/containerd/runc/k8s.io" RuntimeDocker Runtime = "docker" DefaultSocketDocker = "/var/run/docker.sock" DefaultRuncRootDocker = "/run/docker/runtime-runc/moby" RuntimeCrio Runtime = "cri-o" DefaultSocketCrio = "/var/run/crio/crio.sock" DefaultRuncRootCrio = "/run/runc" )
Variables ¶
View Source
var (
AllRuntimes = []Runtime{RuntimeDocker, RuntimeContainerd, RuntimeCrio}
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// List returns a list of all running containers
List(ctx context.Context) ([]Container, error)
// Info returns the info of the given container
Info(ctx context.Context, id string) (Container, error)
Stop(ctx context.Context, id string, graceful bool) error
// Pause pauses the given container
Pause(ctx context.Context, id string) error
// Unpause unpauses the given container
Unpause(ctx context.Context, id string) error
// Version returns the version of the runtime
Version(ctx context.Context) (string, error)
// GetPid returns the pid of the given container
GetPid(ctx context.Context, id string) (int, error)
// Close closes the client
Close() error
// Runtime returns the runtime
Runtime() Runtime
// Socket returns the socket
Socket() string
}
Click to show internal directories.
Click to hide internal directories.