cri

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const BufSize = 32 * 1024

Same as in shimmy

View Source
const PipeTypeStderr = 2
View Source
const PipeTypeStdout = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerOptions

type ContainerOptions struct {
	Name           string
	Command        string
	Args           []string
	RootfsPath     string
	RootfsReadonly bool
	Stdin          bool
	StdinOnce      bool
}

type RuntimeService

type RuntimeService interface {
	// CreateContainer prepares a new container bundle on disk
	// and starts runc init, but does not start a specified process.
	CreateContainer(ContainerOptions) (*container.Container, error)

	// StartContainer actually starts a pre-defined process in
	// a container created via CreateContainer() call.
	StartContainer(container.ID) error

	// StopContainer signals the container to finish itself.
	StopContainer(id container.ID, timeout time.Duration) error

	// Removes container from both conman and runc storages.
	// If container has not been stopped yet, a force flag
	// must be set. If container has already been removed, no
	// error returned (i.e. idempotent behavior).
	RemoveContainer(container.ID) error

	ListContainers() ([]*container.Container, error)

	// GetContainer returns the container doing a state request
	// from the OCI runtime if applicable.
	GetContainer(container.ID) (*container.Container, error)

	streaming.Runtime
}

RuntimeService is a service to manage container & sandbox runtimes. While it resembles the CRI runtime interface, it does not follow it strictly. The purpose of this service is to support the public-facing CRI runtime service (see server.Server).

func NewRuntimeService

func NewRuntimeService(
	runtime oci.Runtime,
	cstore storage.ContainerStore,
	logDir string,
	exitDir string,
	attachDir string,
) (RuntimeService, error)

Jump to

Keyboard shortcuts

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