runtime

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bind added in v0.5.0

type Bind struct {
	HostPath      string
	ContainerPath string
}

func BindBoth added in v0.5.0

func BindBoth(path string) *Bind

Convenience generator for Binds which have the same host and container path

type ContainerConfig added in v0.5.0

type ContainerConfig struct {
	Cmd          []string
	Hostname     string
	Labels       map[string]string
	EnvVars      []string
	Binds        []*Bind
	CapAdds      []string
	Devices      []*Bind
	StopTimeout  uint32
	AutoRemove   bool
	NetworkMode  string
	PortBindings meta.PortMappings
}

type ContainerInspectResult added in v0.5.0

type ContainerInspectResult struct {
	ID        string
	Image     string
	Status    string
	IPAddress net.IP
	PID       uint32
}

type ImageInspectResult

type ImageInspectResult struct {
	ID   *meta.OCIContentID
	Size int64
}

type Interface

type Interface interface {
	PullImage(image meta.OCIImageRef) error
	InspectImage(image meta.OCIImageRef) (*ImageInspectResult, error)
	ExportImage(image meta.OCIImageRef) (io.ReadCloser, func() error, error)

	InspectContainer(container string) (*ContainerInspectResult, error)
	AttachContainer(container string) error
	RunContainer(image meta.OCIImageRef, config *ContainerConfig, name, id string) (string, error)
	StopContainer(container string, timeout *time.Duration) error
	KillContainer(container, signal string) error
	RemoveContainer(container string) error
	ContainerLogs(container string) (io.ReadCloser, error)

	Name() Name
	RawClient() interface{}

	PreflightChecker() preflight.Checker
}

type Name added in v0.6.0

type Name string

Name defines a name for a runtime

const (
	// RuntimeDocker specifies the Docker runtime
	RuntimeDocker Name = "docker"
	// RuntimeContainerd specifies the containerd runtime
	RuntimeContainerd Name = "containerd"
)

func ListRuntimes added in v0.6.0

func ListRuntimes() []Name

ListRuntimes gets the list of available runtimes

func (Name) String added in v0.6.0

func (n Name) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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