container

package
v1.1.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ImageToBootcTarget added in v0.4.0

func ImageToBootcTarget(image string) (string, error)

Bootc does not accept images with tags AND digests specified - in the case when we get both we will use the image digest.

Related underlying issue: https://github.com/containers/image/issues/1736

func IsOsImageReconciled

func IsOsImageReconciled(host *BootcHost, desiredSpec *v1beta1.DeviceSpec) (bool, error)

IsOsImageReconciled returns true if the booted image equals the target for the spec image.

Types

type BootcClient

type BootcClient interface {
	// Status returns the current bootc status.
	Status(ctx context.Context) (*BootcHost, error)
	// Switch targets a new container image reference to boot.
	Switch(ctx context.Context, image string) error
	// UsrOverlay adds a transient writable overlayfs on `/usr` that will be discarded on reboot.
	UsrOverlay(ctx context.Context) error
	// Apply restart or reboot into the new target image.
	Apply(ctx context.Context) error
}

type BootcHost

type BootcHost struct {
	APIVersion string   `json:"apiVersion"`
	Kind       string   `json:"kind"`
	Metadata   Metadata `json:"metadata"`
	Spec       Spec     `json:"spec"`
	Status     Status   `json:"status"`
}

func (*BootcHost) GetBootedImage

func (b *BootcHost) GetBootedImage() string

func (*BootcHost) GetBootedImageDigest added in v0.3.0

func (b *BootcHost) GetBootedImageDigest() string

func (*BootcHost) GetRollbackImage

func (b *BootcHost) GetRollbackImage() string

func (*BootcHost) GetStagedImage

func (b *BootcHost) GetStagedImage() string

type ImageDetails

type ImageDetails struct {
	Image       ImageSpec `json:"image"`
	ImageDigest string    `json:"imageDigest"`
}

type ImageSpec

type ImageSpec struct {
	Image string `json:"image"`
}

type ImageStatus

type ImageStatus struct {
	Image ImageDetails `json:"image"`
}

type Metadata

type Metadata struct {
	Name string `json:"name"`
}

type Spec

type Spec struct {
	Image ImageSpec `json:"image"`
}

type Status

type Status struct {
	Staged   ImageStatus `json:"staged"`
	Booted   ImageStatus `json:"booted"`
	Rollback ImageStatus `json:"rollback"`
	Type     string      `json:"type"`
}

Jump to

Keyboard shortcuts

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