Documentation
¶
Index ¶
- Constants
- func GetAnnotationsAnnotation(o apiutils.Metadata) (map[string]string, error)
- func GetClassLabel(o apiutils.Object) (string, bool)
- func GetLabelsAnnotation(o apiutils.Metadata) (map[string]string, error)
- func GetObjectMetadata(o apiutils.Metadata) (*irimeta.ObjectMetadata, error)
- func IsManagedBy(o apiutils.Object, manager string) bool
- func SetAnnotationsAnnotation(o apiutils.Object, annotations map[string]string) error
- func SetClassLabel(o apiutils.Object, class string)
- func SetLabelsAnnotation(o apiutils.Object, labels map[string]string) error
- func SetManagerLabel(o apiutils.Object, manager string)
- func SetObjectMetadata(o apiutils.Object, metadata *irimeta.ObjectMetadata) error
- type EmptyDiskSpec
- type Machine
- type MachineSpec
- type MachineState
- type MachineStatus
- type NetworkInterfaceSpec
- type NetworkInterfaceState
- type NetworkInterfaceStatus
- type NetworkInterfaceType
- type PowerState
- type VolumeConnection
- type VolumeSpec
- type VolumeState
- type VolumeStatus
- type VolumeType
Constants ¶
View Source
const ( LabelsAnnotation = "cloud-hypervisor-provider.ironcore.dev/labels" AnnotationsAnnotation = "cloud-hypervisor-provider.ironcore.dev/annotations" )
View Source
const ( ManagerLabel = "cloud-hypervisor-provider.ironcore.dev/manager" ClassLabel = "cloud-hypervisor-provider.ironcore.dev/class" )
View Source
const (
MachineManager = "cloud-hypervisor-provider"
)
Variables ¶
This section is empty.
Functions ¶
func GetObjectMetadata ¶
func GetObjectMetadata(o apiutils.Metadata) (*irimeta.ObjectMetadata, error)
func SetClassLabel ¶
func SetLabelsAnnotation ¶
func SetManagerLabel ¶
func SetObjectMetadata ¶
func SetObjectMetadata(o apiutils.Object, metadata *irimeta.ObjectMetadata) error
Types ¶
type EmptyDiskSpec ¶
type EmptyDiskSpec struct {
Size int64 `json:"size"`
}
type Machine ¶
type Machine struct {
apiutils.Metadata `json:"metadata,omitempty"`
Spec MachineSpec `json:"spec"`
Status MachineStatus `json:"status"`
}
type MachineSpec ¶
type MachineSpec struct {
ApiSocketPath *string `json:"api"`
Power PowerState `json:"power"`
Cpu int64 `json:"cpuMillis"`
MemoryBytes int64 `json:"memoryBytes"`
Image *string `json:"image"`
Ignition []byte `json:"ignition"`
Volumes []*VolumeSpec `json:"volumes"`
NetworkInterfaces []*NetworkInterfaceSpec `json:"networkInterfaces"`
ShutdownAt time.Time `json:"shutdownAt,omitempty"`
}
type MachineState ¶
type MachineState string
const ( MachineStatePending MachineState = "Pending" MachineStateRunning MachineState = "Running" MachineStateSuspended MachineState = "Suspended" MachineStateTerminating MachineState = "Terminating" MachineStateTerminated MachineState = "Terminated" )
type MachineStatus ¶
type MachineStatus struct {
VolumeStatus []VolumeStatus `json:"volumeStatus"`
NetworkInterfaceStatus []NetworkInterfaceStatus `json:"networkInterfaceStatus"`
State MachineState `json:"state"`
ImageRef string `json:"imageRef"`
}
type NetworkInterfaceSpec ¶
type NetworkInterfaceState ¶
type NetworkInterfaceState string
const ( NetworkInterfaceStatePending NetworkInterfaceState = "Pending" NetworkInterfaceStatePrepared NetworkInterfaceState = "Prepared" NetworkInterfaceStateAttached NetworkInterfaceState = "Attached" )
type NetworkInterfaceStatus ¶
type NetworkInterfaceStatus struct {
Name string `json:"name"`
Handle string `json:"handle"`
State NetworkInterfaceState `json:"state"`
Type NetworkInterfaceType `json:"type,omitempty"`
Path string `json:"path,omitempty"`
}
type NetworkInterfaceType ¶
type NetworkInterfaceType string
const ( NetworkInterfacePCIType NetworkInterfaceType = "pci" NetworkInterfaceTAPType NetworkInterfaceType = "tap" )
type PowerState ¶
type PowerState int32
const ( PowerStatePowerOn PowerState = 0 PowerStatePowerOff PowerState = 1 )
type VolumeConnection ¶
type VolumeConnection struct {
Driver string ` json:"driver,omitempty"`
Handle string ` json:"handle,omitempty"`
Attributes map[string]string ` json:"attributes,omitempty"`
SecretData map[string][]byte ` json:"secret_data,omitempty"`
EncryptionData map[string][]byte ` json:"encryption_data,omitempty"`
}
type VolumeSpec ¶
type VolumeSpec struct {
Name string `json:"name"`
Device string `json:"device"`
EmptyDisk *EmptyDiskSpec `json:"emptyDisk,omitempty"`
Connection *VolumeConnection `json:"cephDisk,omitempty"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
}
type VolumeState ¶
type VolumeState string
const ( VolumeStatePending VolumeState = "Pending" VolumeStatePrepared VolumeState = "Prepared" VolumeStateAttached VolumeState = "Attached" )
type VolumeStatus ¶
type VolumeStatus struct {
Name string `json:"name,omitempty"`
Type VolumeType `json:"type,omitempty"`
Path string `json:"path,omitempty"`
Handle string `json:"handle,omitempty"`
State VolumeState `json:"state,omitempty"`
Size int64 `json:"size,omitempty"`
}
type VolumeType ¶
type VolumeType string
const ( VolumeSocketType VolumeType = "socket" VolumeFileType VolumeType = "file" )
Click to show internal directories.
Click to hide internal directories.