podsandbox

package
v1.7.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithNRISandboxDelete

func WithNRISandboxDelete(sandboxID string) containerd.ProcessDeleteOpts

WithNRISandboxDelete calls delete for a sandbox'd task

Types

type CRIService

type CRIService interface {
	EnsureImageExists(ctx context.Context, ref string, config *runtime.PodSandboxConfig) (*imagestore.Image, error)

	// TODO: we should implement Event backoff in Controller.
	BackOffEvent(id string, event interface{})
}

CRIService interface contains things required by controller, but not yet refactored from criService. TODO: this will be removed in subsequent iterations.

type Controller

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

func New

func New(
	config criconfig.Config,
	client *containerd.Client,
	sandboxStore *sandboxstore.Store,
	os osinterface.OS,
	cri CRIService,
	baseOCISpecs map[string]*oci.Spec,
) *Controller

func (*Controller) Create

func (c *Controller) Create(ctx context.Context, _id string) error

func (*Controller) Delete

func (c *Controller) Delete(ctx context.Context, sandboxID string) (*api.ControllerDeleteResponse, error)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, id string) (_ *api.ControllerStartResponse, retErr error)

func (*Controller) Status

func (c *Controller) Status(ctx context.Context, sandboxID string) (*api.ControllerStatusResponse, error)

func (*Controller) Stop

func (c *Controller) Stop(ctx context.Context, sandboxID string) (*api.ControllerStopResponse, error)

func (*Controller) Wait

func (c *Controller) Wait(ctx context.Context, sandboxID string) (*api.ControllerWaitResponse, error)

type Status

type Status struct {
	Waiter <-chan containerd.ExitStatus
}

type Store

type Store struct {
	sync.Map
}

func NewStore

func NewStore() *Store

func (*Store) Get

func (s *Store) Get(id string) *Status

func (*Store) Save

func (s *Store) Save(id string, exitCh <-chan containerd.ExitStatus)

Jump to

Keyboard shortcuts

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