cri

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStockImageServiceClient

func NewStockImageServiceClient() (criapi.ImageServiceClient, error)

func NewStockRuntimeServiceClient

func NewStockRuntimeServiceClient() (criapi.RuntimeServiceClient, error)

Types

type Service

type Service struct {
	sync.Mutex

	criapi.ImageServiceServer
	criapi.RuntimeServiceServer
	// contains filtered or unexported fields
}

Service contains essential objects for host orchestration.

func NewService

func NewService(serv ServiceInterface) (*Service, error)

NewService initializes the host orchestration state.

func (*Service) Attach

Attach prepares a streaming endpoint to attach to a running container.

func (*Service) ContainerStats

ContainerStats returns stats of the container. If the container does not exist, the call returns an error.

func (*Service) ContainerStatus

ContainerStatus returns status of the container. If the container is not present, returns an error.

func (*Service) Exec

Exec prepares a streaming endpoint to execute a command in the container.

func (*Service) ExecSync

ExecSync runs a command in a container synchronously.

func (*Service) ImageFsInfo

ImageFsInfo returns information of the filesystem that is used to store images.

func (*Service) ImageStatus

ImageStatus returns the status of the image. If the image is not present, returns a response with ImageStatusResponse.Image set to nil.

func (*Service) ListContainerStats

ListContainerStats returns stats of all running containers.

func (*Service) ListContainers

ListContainers lists all containers by filters.

func (*Service) ListImages

ListImages lists existing images.

func (*Service) ListPodSandbox

ListPodSandbox returns a list of PodSandboxes.

func (*Service) PodSandboxStatus

PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not present, returns an error.

func (*Service) PortForward

PortForward prepares a streaming endpoint to forward ports from a PodSandbox.

func (*Service) PullImage

PullImage pulls an image with authentication config.

func (*Service) Register

func (s *Service) Register(server *grpc.Server)

Register registers the criapi servers.

func (*Service) RemoveImage

RemoveImage removes the image.

func (*Service) RemovePodSandbox

RemovePodSandbox removes the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated and removed.

func (*Service) ReopenContainerLog

ReopenContainerLog asks runtime to reopen the stdout/stderr log file for the container.

func (*Service) RunPodSandbox

RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure the sandbox is in the ready state on success.

func (*Service) StartContainer

StartContainer starts the container.

func (*Service) Status

Status returns the status of the runtime.

func (*Service) StopContainer

StopContainer stops a running container with a grace period (i.e., timeout).

func (*Service) StopPodSandbox

StopPodSandbox stops any running process that is part of the sandbox and reclaims network resources (e.g., IP addresses) allocated to the sandbox.

func (*Service) UpdateContainerResources

UpdateContainerResources updates ContainerConfig of the container.

func (*Service) UpdateRuntimeConfig

UpdateRuntimeConfig updates the runtime configuration based on the given request.

func (*Service) Version

Version returns the runtime name, runtime version, and runtime API version.

type ServiceInterface

type ServiceInterface interface {
	CreateContainer(ctx context.Context, r *criapi.CreateContainerRequest) (*criapi.CreateContainerResponse, error)
	RemoveContainer(ctx context.Context, r *criapi.RemoveContainerRequest) (*criapi.RemoveContainerResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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