errors

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSpecRequired                       = errors.New("microvm spec is required")
	ErrVMIDRequired                       = errors.New("id for microvm is required")
	ErrNameRequired                       = errors.New("name is required")
	ErrUIDRequired                        = errors.New("uid is required")
	ErrNamespaceRequired                  = errors.New("namespace is required")
	ErrKernelImageRequired                = errors.New("kernel image is required")
	ErrVolumeRequired                     = errors.New("no volumes specified, at least 1 volume is required")
	ErrRootVolumeRequired                 = errors.New("a root volume is required")
	ErrNoMount                            = errors.New("no image mount point")
	ErrNoVolumeMount                      = errors.New("no volume mount point")
	ErrParentIfaceRequiredForMacvtap      = errors.New("a parent network device name is required for macvtap interfaces")
	ErrParentIfaceRequiredForAttachingTap = errors.New("a parent network device name is required for attaching a TAP interface") //nolint: lll // that is okay
	ErrGuestDeviceNameRequired            = errors.New("a guest device name is required")
	ErrUnsupportedIfaceType               = errors.New("unsupported network interface type")
	ErrIfaceNotFound                      = errors.New("network interface not found")
	ErrMissingStatusInfo                  = errors.New("status is not defined")
	ErrUnableToBoot                       = errors.New("microvm is unable to boot")
)

Functions

func IsNotSupported

func IsNotSupported(err error) bool

IsNotSupported tests an error to see if its a not supported error.

func IsSpecNotFound

func IsSpecNotFound(err error) bool

IsSpecNotFound tests an error to see if its a spec not found error.

func NewNotSupported

func NewNotSupported(featureName string) error

func NewSpecNotFound

func NewSpecNotFound(name, namespace, version, uid string) error

Types

type IncorrectVMIDFormatError

type IncorrectVMIDFormatError struct {
	ActualID string
}

func (IncorrectVMIDFormatError) Error

func (e IncorrectVMIDFormatError) Error() string

Error returns the error message.

type NetworkInterfaceStatusMissingError

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

NetworkInterfaceStatusMissing is an error used when a network interfaces status cannot be found.

func NewNetworkInterfaceStatusMissing

func NewNetworkInterfaceStatusMissing(guestIface string) NetworkInterfaceStatusMissingError

func (NetworkInterfaceStatusMissingError) Error

Error returns the error message.

type TopicNotFoundError

type TopicNotFoundError struct {
	Name string
}

TopicNotFoundError is an error created when a topic with a specific name isn't found.

func (TopicNotFoundError) Error

func (e TopicNotFoundError) Error() string

Error returns the error message.

type UnsupportedInterfaceError

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

func NewErrUnsupportedInterface

func NewErrUnsupportedInterface(ifaceType string) UnsupportedInterfaceError

func (UnsupportedInterfaceError) Error

Error returns the error message.

type VolumeNotMountedError

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

VolumeNotMountedError is an error used when a volume hasn't been mounted.

func NewVolumeNotMounted

func NewVolumeNotMounted(volumeID string) VolumeNotMountedError

func (VolumeNotMountedError) Error

func (e VolumeNotMountedError) Error() string

Error returns the error message.

Jump to

Keyboard shortcuts

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