podsandbox

package
v2.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MetadataKey is the key used for storing metadata in the sandbox extensions
	MetadataKey = "metadata"
)

Variables

This section is empty.

Functions

func WithNRISandboxDelete

func WithNRISandboxDelete(sandboxID string) containerd.ProcessDeleteOpts

WithNRISandboxDelete calls delete for a sandbox'd task

Types

type CleanupErr

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

type Controller

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

func (*Controller) Create

func (c *Controller) Create(_ctx context.Context, info sandbox.Sandbox, opts ...sandbox.CreateOpt) error

func (*Controller) Metrics

func (c *Controller) Metrics(ctx context.Context, sandboxID string) (*types.Metric, error)

TODO(dcantah): Implement metrics to be used for SandboxStats rpc.

func (*Controller) Platform

func (c *Controller) Platform(_ctx context.Context, _sandboxID string) (platforms.Platform, error)

func (*Controller) RecoverContainer

func (c *Controller) RecoverContainer(ctx context.Context, cntr containerd.Container) (sandboxstore.Sandbox, error)

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context, sandboxID string) error

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, id string) (cin sandbox.ControllerInstance, retErr error)

Start creates resources required for the sandbox and starts the sandbox. If an error occurs, Start attempts to tear down the created resources. If an error occurs while tearing down resources, a zero-valued response is returned alongside the error. If the teardown was successful, a nil response is returned with the error. TODO(samuelkarp) Determine whether this error indication is reasonable to retain once controller.Delete is implemented.

func (*Controller) Status

func (c *Controller) Status(ctx context.Context, sandboxID string, verbose bool) (sandbox.ControllerStatus, error)

func (*Controller) Stop

func (c *Controller) Stop(ctx context.Context, sandboxID string, _ ...sandbox.StopOpt) error

func (*Controller) Wait

func (c *Controller) Wait(ctx context.Context, sandboxID string) (sandbox.ExitStatus, error)

type ImageService

type ImageService interface {
	LocalResolve(refOrID string) (imagestore.Image, error)
	GetImage(id string) (imagestore.Image, error)
	PullImage(ctx context.Context, name string, creds func(string) (string, string, error), sc *runtime.PodSandboxConfig, runtimeHandler string) (string, error)
	RuntimeSnapshotter(ctx context.Context, ociRuntime criconfig.Runtime) string
	PinnedImage(string) string
}

ImageService specifies dependencies to CRI image service.

type RuntimeService

type RuntimeService interface {
	Config() criconfig.Config
	LoadOCISpec(string) (*oci.Spec, error)
}

RuntimeService specifies dependencies to CRI runtime service.

type Store

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

func NewStore

func NewStore() *Store

func (*Store) Get

func (s *Store) Get(id string) *types.PodSandbox

func (*Store) Remove

func (s *Store) Remove(id string) *types.PodSandbox

func (*Store) Save

func (s *Store) Save(p *types.PodSandbox) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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