nri

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(nri nri.API) *API

func (*API) CreateContainer

func (a *API) CreateContainer(ctx context.Context, ctrs *containers.Container, spec *specs.Spec) (*api.ContainerAdjustment, error)

func (*API) EvictContainer

func (a *API) EvictContainer(ctx context.Context, e *api.ContainerEviction) error

func (*API) GetContainer

func (a *API) GetContainer(id string) (nri.Container, bool)

func (*API) GetName

func (a *API) GetName() string

func (*API) GetPodSandbox

func (a *API) GetPodSandbox(id string) (nri.PodSandbox, bool)

func (*API) IsDisabled

func (a *API) IsDisabled() bool

func (*API) IsEnabled

func (a *API) IsEnabled() bool

func (*API) ListContainers

func (a *API) ListContainers() []nri.Container

func (*API) ListPodSandboxes

func (a *API) ListPodSandboxes() []nri.PodSandbox

func (*API) NotifyContainerExit

func (a *API) NotifyContainerExit(ctx context.Context, criCtr *cstore.Container)

func (*API) PostCreateContainer

func (a *API) PostCreateContainer(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) PostStartContainer

func (a *API) PostStartContainer(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) PostUpdateContainerResources

func (a *API) PostUpdateContainerResources(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) Register

func (a *API) Register(cri CRIImplementation) error

func (*API) RemoveContainer

func (a *API) RemoveContainer(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) RemovePodSandbox

func (a *API) RemovePodSandbox(ctx context.Context, criPod *sstore.Sandbox) error

func (*API) RunPodSandbox

func (a *API) RunPodSandbox(ctx context.Context, criPod *sstore.Sandbox) error

func (*API) StartContainer

func (a *API) StartContainer(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) StopContainer

func (a *API) StopContainer(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container) error

func (*API) StopPodSandbox

func (a *API) StopPodSandbox(ctx context.Context, criPod *sstore.Sandbox) error

func (*API) UndoCreateContainer

func (a *API) UndoCreateContainer(ctx context.Context, criPod *sstore.Sandbox, id string, spec *specs.Spec)

func (*API) UpdateContainer

func (a *API) UpdateContainer(ctx context.Context, u *api.ContainerUpdate) error

func (*API) UpdateContainerResources

func (a *API) UpdateContainerResources(ctx context.Context, criPod *sstore.Sandbox, criCtr *cstore.Container, req *cri.LinuxContainerResources) (*cri.LinuxContainerResources, error)

func (*API) WithContainerAdjustment

func (a *API) WithContainerAdjustment() containerd.NewContainerOpts

func (*API) WithContainerExit

func (a *API) WithContainerExit(criCtr *cstore.Container) containerd.ProcessDeleteOpts

type CRIImplementation

type CRIImplementation interface {
	Config() *criconfig.Config
	SandboxStore() *sstore.Store
	ContainerStore() *cstore.Store
	ContainerMetadataExtensionKey() string
	UpdateContainerResources(context.Context, cstore.Container, *cri.UpdateContainerResourcesRequest, cstore.Status) (cstore.Status, error)
	StopContainer(context.Context, cstore.Container, time.Duration) error
}

Jump to

Keyboard shortcuts

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