imageprovider

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratedImage

type GeneratedImage struct {
	ImageURL          string
	KernelURL         string
	ExtraKernelParams string
}

GeneratedImage contains information about the generated image. At least the URL must be populated.

type ImageBuildInvalid

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

func BuildInvalidError

func BuildInvalidError(err error) ImageBuildInvalid

func (ImageBuildInvalid) Error

func (ibf ImageBuildInvalid) Error() string

func (ImageBuildInvalid) Unwrap

func (ibf ImageBuildInvalid) Unwrap() error

type ImageData

type ImageData struct {
	ImageMetadata     *metav1.ObjectMeta
	Format            metal3.ImageFormat
	Architecture      string
	NetworkDataStatus metal3.SecretStatus
}

ImageData contains information about the image type being requested, and metadata about the request.

type ImageNotReady

type ImageNotReady struct{}

func (ImageNotReady) Error

func (inr ImageNotReady) Error() string

type ImageProvider

type ImageProvider interface {
	// SupportsArchitecture returns whether the ImageProvider can provide
	// images for the given processor architecture.
	SupportsArchitecture(string) bool

	// SupportsFormat returns whether the ImageProvider can provide images in
	// the given format.
	SupportsFormat(metal3.ImageFormat) bool

	// BuildImage requests the ImageProvider to build an image with the
	// supplied network data and return a URL where it can be accessed.
	BuildImage(ImageData, NetworkData, logr.Logger) (GeneratedImage, error)

	// DiscardImage notifies the ImageProvider that a previously built image
	// is no longer required.
	DiscardImage(ImageData) error
}

func NewDefaultImageProvider

func NewDefaultImageProvider() ImageProvider

type NetworkData

type NetworkData map[string][]byte

Jump to

Keyboard shortcuts

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