cri

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRIPlugin

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

CRIPlugin implements the Kubernetes Container Runtime Interface. This provides a K8s-compatible container runtime via the CRI gRPC protocol.

func NewCRIPlugin

func NewCRIPlugin(rt *runtime.Runtime, img *image.Store, net *network.Manager) *CRIPlugin

NewCRIPlugin creates a new CRI plugin.

func (*CRIPlugin) CreateContainer

func (c *CRIPlugin) CreateContainer(podID, containerID string, imageName string, args, env []string) error

CreateContainer creates a container within a pod sandbox.

func (*CRIPlugin) ImageStatus

func (c *CRIPlugin) ImageStatus(imageName string) (*common.ImageInfo, error)

ImageStatus returns the status of an image.

func (*CRIPlugin) IsCRIReady

func (c *CRIPlugin) IsCRIReady() bool

IsCRIReady checks if CRI plugin is ready.

func (*CRIPlugin) ListImages

func (c *CRIPlugin) ListImages() ([]common.ImageInfo, error)

ListImages lists all available images.

func (*CRIPlugin) ListPodSandbox

func (c *CRIPlugin) ListPodSandbox() []*PodSandbox

ListPodSandbox lists all pod sandboxes.

func (*CRIPlugin) PodSandboxStatus

func (c *CRIPlugin) PodSandboxStatus(id string) (*PodSandbox, error)

PodSandboxStatus returns the status of a pod sandbox.

func (*CRIPlugin) PullImage

func (c *CRIPlugin) PullImage(imageName string) error

PullImage pulls an image.

func (*CRIPlugin) RemoveImage

func (c *CRIPlugin) RemoveImage(imageName string) error

RemoveImage removes an image.

func (*CRIPlugin) RemovePodSandbox

func (c *CRIPlugin) RemovePodSandbox(id string) error

RemovePodSandbox removes a pod sandbox.

func (*CRIPlugin) RunPodSandbox

func (c *CRIPlugin) RunPodSandbox(id, name, namespace string, labels, annotations map[string]string) (*PodSandbox, error)

RunPodSandbox creates and starts a pod sandbox.

func (*CRIPlugin) StopPodSandbox

func (c *CRIPlugin) StopPodSandbox(id string) error

StopPodSandbox stops a pod sandbox.

func (*CRIPlugin) Version

func (c *CRIPlugin) Version() map[string]string

Version returns CRI version info.

type PodSandbox

type PodSandbox struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Namespace    string            `json:"namespace"`
	UID          string            `json:"uid"`
	CreatedAt    int64             `json:"created_at"`
	Labels       map[string]string `json:"labels"`
	Annotations  map[string]string `json:"annotations"`
	Containers   []string          `json:"containers"`
	Hostname     string            `json:"hostname"`
	LogDirectory string            `json:"log_directory"`
	State        string            `json:"state"`
}

PodSandbox represents a Kubernetes Pod.

Jump to

Keyboard shortcuts

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