Documentation ¶
Index ¶
- Constants
- type Address
- type AddressService
- type Flavor
- type FlavorService
- type Image
- type ImageArchitecture
- type ImageService
- type ImageStatus
- type ImageType
- type Instance
- type InstanceAction
- type InstanceStatus
- type KeypairService
- type Provider
- type PublicKey
- type ReimageService
- type RenameService
- type ResizeService
- type Service
- type VNCService
Constants ¶
View Source
const ( ArchAMD64 = "amd64" Archi386 = "i386" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressService ¶
type FlavorService ¶
type Image ¶
type Image struct { ID string Name string Regions []string Type ImageType Format string Status ImageStatus Public bool Size int64 SourceInstance string SourceURL string Distribution string Version string Architecture ImageArchitecture // Key-value additional details of the image. Details map[string]string }
type ImageArchitecture ¶
type ImageArchitecture string
type ImageService ¶
type ImageService interface { // Creates an image based on the specified fields. // If SourceInstance is set, the instance is snapshotted // If SourceURL is set, the image is retrieved from URL. CreateImage(image *Image) (*Image, error) // Looks for an image matching the specified image. // If successful, returns nil if image not found, or the image ID. FindImage(image *Image) (string, error) ListImages() ([]*Image, error) GetImage(imageID string) (*Image, error) DeleteImage(imageID string) error }
type ImageStatus ¶
type ImageStatus string
const ( ImageAvailable ImageStatus = "available" ImagePending ImageStatus = "pending" )
type ImageType ¶
type ImageType string
const ( TemplateImage ImageType = "template" ISOImage = "iso" )
type Instance ¶
type Instance struct { ID string Name string Region string IP string PrivateIP string Image Image Flavor Flavor PublicKey PublicKey Status InstanceStatus Username string Password string // A temporary identifier that can be used to get additional details on the // instance immediately after it has been provisioned. For example, some // providers return the instance password this way. JobID string // Bytes of bandwidth used. BandwidthUsed int64 // Tenant network ID. NetworkID string // Key-value additional details of the instance. Details map[string]string // Additional custom actions supported for this instance. Actions []InstanceAction }
type InstanceAction ¶
type InstanceStatus ¶
type InstanceStatus string
const ( StatusOnline InstanceStatus = "online" StatusOffline InstanceStatus = "offline" )
type KeypairService ¶
type ReimageService ¶
type RenameService ¶
type ResizeService ¶
type Service ¶
type Service interface { // Creates a new instance. // All fields in Instance struct are optional. ID and JobID are always ignored. // Other fields may also be ignored or cause errors. CreateInstance(instance *Instance) (*Instance, error) // Destroys the specified instance. DeleteInstance(instanceID string) error // Lists instances. ListInstances() ([]*Instance, error) // Gets information about a specific instance. // This may return more details than ListInstances. GetInstance(instanceID string) (*Instance, error) // Starts/boots an instance. StartInstance(instanceID string) error // Stops/shuts down an instance. StopInstance(instanceID string) error // Reboots an instance. RebootInstance(instanceID string) error }
type VNCService ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.