crio

package
v0.0.0-...-007c8aa Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package crio provides a crio client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOverlayImagePath

func GetOverlayImagePath() string

GetOverlayImagePath returns the path to the overlay-images directory.

func GetOverlayLayersPath

func GetOverlayLayersPath() string

GetOverlayLayersPath returns the path to the overlay-layers directory.

func GetOverlayPath

func GetOverlayPath() string

GetOverlayPath returns the path to the overlay directory.

Types

type Client

type Client interface {
	// RuntimeMetadata returns metadata about the container runtime, including version details.
	// Accepts a context to manage request lifetime.
	RuntimeMetadata(ctx context.Context) (*v1.VersionResponse, error)

	// GetAllContainers lists all containers managed by CRI-O.
	// Accepts a context for managing request lifetime and returns a slice of container metadata.
	GetAllContainers(ctx context.Context) ([]*v1.Container, error)

	// GetContainerStatus retrieves the status of a specified container by containerID.
	// Accepts a context for the request and returns details on container state, creation time, and exit codes.
	GetContainerStatus(ctx context.Context, containerID string) (*v1.ContainerStatusResponse, error)

	// GetContainerImage fetches metadata for a specified image, identified by imageSpec.
	// Accepts a context, the imageSpec to identify the image, and a verbose flag for detailed metadata.
	GetContainerImage(ctx context.Context, imageSpec *v1.ImageSpec, verbose bool) (*v1.ImageStatusResponse, error)

	// GetPodStatus provides the status of a specified pod sandbox, identified by podSandboxID.
	// Takes a context to manage the request and returns sandbox status information.
	GetPodStatus(ctx context.Context, podSandboxID string) (*v1.PodSandboxStatus, error)

	// GetCRIOImageLayers returns paths to `diff` directories for each layer of the specified image,
	// using imgMeta to identify the image and resolve its layers.
	GetCRIOImageLayers(imgMeta *workloadmeta.ContainerImageMetadata) ([]string, error)
}

Client defines an interface for interacting with the CRI-API, providing methods for retrieving information about container and pod statuses, images, and metadata.

func NewCRIOClient

func NewCRIOClient() (Client, error)

NewCRIOClient creates a new CRI-O client implementing the Client interface.

Jump to

Keyboard shortcuts

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