containerd

package
v0.0.0-...-5c05252 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContainerdConfigPath = "/etc/containerd/config.toml"
	DefaultContainerdRootPath   = "/var/lib/containerd"
)
View Source
const (
	DefaultNamespace = "k8s.io"
)

Variables

View Source
var (
	ParamRegistryName   = "registry"
	DefaultRegistryName = "docker.io"

	ParamImageName = "image"
)

Functions

func DeleteImage

func DeleteImage(ctx *fiber.Ctx) error

func DeleteRegistryMirror

func DeleteRegistryMirror(ctx *fiber.Ctx) error

func EnsureRegistryMirror

func EnsureRegistryMirror(ctx context.Context, registry string, endpoint string) (bool, error)

EnsureRegistryMirror ensures the given endpoint is the first entry for the registry mirror. Returns updated=true if configuration changed and was persisted (containerd restarted), or updated=false if it was already first. Returns error on failure.

func GetRegistryMirrors

func GetRegistryMirrors(ctx *fiber.Ctx) (map[string]Mirror, error)

func ListImages

func ListImages(ctx *fiber.Ctx, registry string) ([]*criruntimev1.Image, error)

func NewCRIImageService

func NewCRIImageService() (criapi.ImageManagerService, error)

func NewCRIRuntimeService

func NewCRIRuntimeService() (criapi.RuntimeService, error)

func NewClient

func NewClient() (*containerd.Client, error)

Types

type Mirror

type Mirror = config.Mirror

Mirror is an alias for the containerd CRI plugin Mirror type for convenience

func GetRegistryMirror

func GetRegistryMirror(ctx *fiber.Ctx) (*Mirror, error)

func UpdateRegistryMirror

func UpdateRegistryMirror(ctx *fiber.Ctx) (*Mirror, error)

type PruneImageResult

type PruneImageResult struct {
	Images []*criruntimev1.Image `json:"images"`
	Count  int                   `json:"count"`
	Size   uint64                `json:"size"`
}

func PruneImages

func PruneImages(ctx *fiber.Ctx) (*PruneImageResult, error)

type Registry

type Registry struct {
	Name       string   `json:"name"`
	Endpoints  []string `json:"endpoints"`
	ImageCount int      `json:"image_count"`
	ImageSize  uint64   `json:"image_size"`
}

func ListRegistries

func ListRegistries(ctx *fiber.Ctx) ([]*Registry, error)

merge registries both from parsing images and mirror configs

Jump to

Keyboard shortcuts

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