instancetype

package
v0.0.0-...-288c4de Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Any represents any type of instance.
	Any = Type(-1)

	// Container represents a container instance type.
	Container = Type(0)

	// VM represents a virtual-machine instance type.
	VM = Type(1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int

Type indicates the type of instance.

func New

func New(name string) (Type, error)

New validates the supplied string against the allowed types of instance and returns the internal representation of that type. If empty string is supplied then the type returned is TypeContainer. If an invalid name is supplied an error will be returned.

func (Type) Filter

func (instanceType Type) Filter() *Type

Filter returns a valid filter field compatible with cluster.InstanceFilter. 'Any' represents any possible instance type, and so it is omitted.

func (Type) String

func (instanceType Type) String() string

String converts the internal representation of instance type to a string used in API requests. Returns empty string if value is not a valid instance type.

type VMAgentData

type VMAgentData struct {
	Name        string                         `json:"name"`
	CloudInitID string                         `json:"cloud_init_id"`
	Location    string                         `json:"location"`
	Config      map[string]string              `json:"config,omitempty"`
	Devices     map[string]deviceConfig.Device `json:"devices,omitempty"`
}

VMAgentData represents the instance data exposed to the VM agent.

type VMAgentMount

type VMAgentMount struct {
	Source  string   `json:"source"`
	Target  string   `json:"target"`
	FSType  string   `json:"fstype"`
	Options []string `json:"options"`
}

VMAgentMount defines mounts to perform inside VM via agent.

Jump to

Keyboard shortcuts

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