Documentation ¶
Index ¶
Constants ¶
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 ¶
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 ¶
Filter returns a valid filter field compatible with cluster.InstanceFilter. 'Any' represents any possible instance type, and so it is omitted.
func (Type) 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.
func (Type) ToAPI ¶
func (instanceType Type) ToAPI() api.InstanceType
ToAPI converts the internal representation of instance type to an api.InstanceType.
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.