types

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 1 Imported by: 0

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

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

type Container

type Container interface {
	Id() string
	Name() string
	ImageName() string
	Labels() map[string]string
}

type Runtime

type Runtime string

func (Runtime) DefaultRuncRoot

func (runtime Runtime) DefaultRuncRoot() string

func (Runtime) DefaultSocket

func (runtime Runtime) DefaultSocket() string

Jump to

Keyboard shortcuts

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