containerd

package
v1.5.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(ctx context.Context, namespace string, reqs ...*ImportRequest) error

Import imports the images specified by the import requests.

func NewRunner

func NewRunner(debug bool, args *runner.Args, setters ...runner.Option) runner.Runner

NewRunner creates runner.Runner that runs a container in containerd.

func WithCustomSeccompProfile

func WithCustomSeccompProfile(override func(*specs.LinuxSeccomp)) oci.SpecOpts

WithCustomSeccompProfile allows to override default seccomp profile.

func WithMemoryLimit

func WithMemoryLimit(limit int64) oci.SpecOpts

WithMemoryLimit sets the linux resource memory limit field.

func WithOOMScoreAdj

func WithOOMScoreAdj(score int) oci.SpecOpts

WithOOMScoreAdj sets the oom score.

func WithRootfsPropagation

func WithRootfsPropagation(rp string) oci.SpecOpts

WithRootfsPropagation sets the root filesystem propagation.

Types

type ImportRequest

type ImportRequest struct {
	Path    string
	Options []containerd.ImportOpt
}

ImportRequest represents an image import request.

type Importer

type Importer struct {
	// contains filtered or unexported fields
}

Importer implements image import.

func NewImporter

func NewImporter(namespace string, options ...ImporterOption) *Importer

NewImporter builds new Importer.

func (*Importer) Import

func (i *Importer) Import(ctx context.Context, reqs ...*ImportRequest) (err error)

Import imports the images specified by the import requests.

type ImporterOption

type ImporterOption func(*importerOptions)

ImporterOption configures containerd Inspector.

func WithContainerdAddress

func WithContainerdAddress(address string) ImporterOption

WithContainerdAddress configures containerd address to use.

type StdinCloser

type StdinCloser struct {
	Stdin  io.Reader
	Closer chan struct{}
}

StdinCloser wraps io.Reader providing a signal when reader is read till EOF.

func (*StdinCloser) Read

func (s *StdinCloser) Read(p []byte) (int, error)

func (*StdinCloser) WaitAndClose

func (s *StdinCloser) WaitAndClose(ctx context.Context, task containerd.Task)

WaitAndClose closes containerd task stdin when StdinCloser is exhausted.

Jump to

Keyboard shortcuts

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