types

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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