Documentation ¶
Index ¶
- Constants
- func CompareIPs(left, right net.IP) bool
- func IpListsEqual(left, right []net.IP) bool
- func ShrinkIP(netIP net.IP) net.IP
- type AcknowledgeVmRequest
- type AcknowledgeVmResponse
- type AddVmVolumesRequest
- type AddVmVolumesResponse
- type Address
- type AddressList
- type BecomePrimaryVmOwnerRequest
- type BecomePrimaryVmOwnerResponse
- type ChangeAddressPoolRequest
- type ChangeAddressPoolResponse
- type ChangeOwnersRequest
- type ChangeOwnersResponse
- type ChangeVmConsoleTypeRequest
- type ChangeVmConsoleTypeResponse
- type ChangeVmDestroyProtectionRequest
- type ChangeVmDestroyProtectionResponse
- type ChangeVmOwnerUsersRequest
- type ChangeVmOwnerUsersResponse
- type ChangeVmSizeRequest
- type ChangeVmSizeResponse
- type ChangeVmTagsRequest
- type ChangeVmTagsResponse
- type ChangeVmVolumeSizeRequest
- type ChangeVmVolumeSizeResponse
- type CommitImportedVmRequest
- type CommitImportedVmResponse
- type ConnectToVmConsoleRequest
- type ConnectToVmConsoleResponse
- type ConnectToVmManagerRequest
- type ConnectToVmManagerResponse
- type ConnectToVmSerialPortRequest
- type ConnectToVmSerialPortResponse
- type ConsoleType
- type CopyVmRequest
- type CopyVmResponse
- type CreateVmRequest
- type CreateVmResponse
- type DebugVmImageRequest
- type DebugVmImageResponse
- type DeleteVmVolumeRequest
- type DeleteVmVolumeResponse
- type DestroyVmRequest
- type DestroyVmResponse
- type DiscardVmAccessTokenRequest
- type DiscardVmAccessTokenResponse
- type DiscardVmOldImageRequest
- type DiscardVmOldImageResponse
- type DiscardVmOldUserDataRequest
- type DiscardVmOldUserDataResponse
- type DiscardVmSnapshotRequest
- type DiscardVmSnapshotResponse
- type ExportLocalVmInfo
- type ExportLocalVmRequest
- type ExportLocalVmResponse
- type GetCapacityRequest
- type GetCapacityResponse
- type GetRootCookiePathRequest
- type GetRootCookiePathResponse
- type GetUpdatesRequest
- type GetVmAccessTokenRequest
- type GetVmAccessTokenResponse
- type GetVmInfoRequest
- type GetVmInfoResponse
- type GetVmLastPatchLogRequest
- type GetVmLastPatchLogResponse
- type GetVmUserDataRequest
- type GetVmUserDataResponse
- type GetVmVolumeRequest
- type GetVmVolumeResponse
- type HoldLockRequest
- type HoldLockResponse
- type HoldVmLockRequest
- type HoldVmLockResponse
- type ImportLocalVmRequest
- type ImportLocalVmResponse
- type ListSubnetsRequest
- type ListSubnetsResponse
- type ListVMsRequest
- type ListVMsResponse
- type ListVolumeDirectoriesRequest
- type ListVolumeDirectoriesResponse
- type LocalVmInfo
- type LocalVolume
- type MigrateVmRequest
- type MigrateVmResponse
- type MigrateVmResponseResponse
- type NetbootMachineRequest
- type NetbootMachineResponse
- type PatchVmImageRequest
- type PatchVmImageResponse
- type PowerOffRequest
- type PowerOffResponse
- type PrepareVmForMigrationRequest
- type PrepareVmForMigrationResponse
- type ProbeVmPortRequest
- type ProbeVmPortResponse
- type RebootVmRequest
- type RebootVmResponse
- type RegisterExternalLeasesRequest
- type RegisterExternalLeasesResponse
- type ReorderVmVolumesRequest
- type ReorderVmVolumesResponse
- type ReplaceVmCredentialsRequest
- type ReplaceVmCredentialsResponse
- type ReplaceVmImageRequest
- type ReplaceVmImageResponse
- type ReplaceVmUserDataRequest
- type ReplaceVmUserDataResponse
- type RestoreVmFromSnapshotRequest
- type RestoreVmFromSnapshotResponse
- type RestoreVmImageRequest
- type RestoreVmImageResponse
- type RestoreVmUserDataRequest
- type RestoreVmUserDataResponse
- type ScanVmRootRequest
- type ScanVmRootResponse
- type SetDisabledStateRequest
- type SetDisabledStateResponse
- type SnapshotVmRequest
- type SnapshotVmResponse
- type StartVmRequest
- type StartVmResponse
- type State
- type StopVmRequest
- type StopVmResponse
- type Subnet
- type TraceVmMetadataRequest
- type TraceVmMetadataResponse
- type Update
- type UpdateSubnetsRequest
- type UpdateSubnetsResponse
- type VmInfo
- type Volume
- type VolumeFormat
- type VolumeInitialisationInfo
- type VolumeType
- type WatchDhcpRequest
- type WatchDhcpResponse
Constants ¶
View Source
const ( ConsoleNone = 0 ConsoleDummy = 1 ConsoleVNC = 2 StateStarting = 0 StateRunning = 1 StateFailedToStart = 2 StateStopping = 3 StateStopped = 4 StateDestroying = 5 StateMigrating = 6 StateExporting = 7 StateCrashed = 8 StateDebugging = 9 VolumeFormatRaw = 0 VolumeFormatQCOW2 = 1 VolumeTypePersistent = 0 VolumeTypeMemory = 1 )
Variables ¶
This section is empty.
Functions ¶
func CompareIPs ¶
CompareIP returns true if the two IPs are equivalent, else false.
func IpListsEqual ¶
Types ¶
type AcknowledgeVmRequest ¶
type AcknowledgeVmResponse ¶
type AcknowledgeVmResponse struct {
Error string
}
type AddVmVolumesRequest ¶
type AddVmVolumesResponse ¶
type AddVmVolumesResponse struct {
Error string
}
type AddressList ¶
type AddressList []Address
func (*AddressList) Set ¶
func (al *AddressList) Set(value string) error
func (*AddressList) String ¶
func (al *AddressList) String() string
type BecomePrimaryVmOwnerResponse ¶
type BecomePrimaryVmOwnerResponse struct {
Error string
}
type ChangeAddressPoolResponse ¶
type ChangeAddressPoolResponse struct {
Error string
}
type ChangeOwnersRequest ¶
type ChangeOwnersResponse ¶
type ChangeOwnersResponse struct {
Error string
}
type ChangeVmConsoleTypeRequest ¶
type ChangeVmConsoleTypeRequest struct { ConsoleType ConsoleType IpAddress net.IP }
type ChangeVmConsoleTypeResponse ¶
type ChangeVmConsoleTypeResponse struct {
Error string
}
type ChangeVmDestroyProtectionResponse ¶
type ChangeVmDestroyProtectionResponse struct {
Error string
}
type ChangeVmOwnerUsersResponse ¶
type ChangeVmOwnerUsersResponse struct {
Error string
}
type ChangeVmSizeRequest ¶
type ChangeVmSizeResponse ¶
type ChangeVmSizeResponse struct {
Error string
}
type ChangeVmTagsResponse ¶
type ChangeVmTagsResponse struct {
Error string
}
type ChangeVmVolumeSizeRequest ¶ added in v0.3.2
type ChangeVmVolumeSizeResponse ¶ added in v0.3.2
type ChangeVmVolumeSizeResponse struct {
Error string
}
type CommitImportedVmRequest ¶
type CommitImportedVmResponse ¶
type CommitImportedVmResponse struct {
Error string
}
type ConnectToVmConsoleRequest ¶
The ConnectToVmConsole RPC is fully streamed. After the request/response, the connection/client is hijacked and each side of the connection will send a stream of bytes.
type ConnectToVmConsoleResponse ¶
type ConnectToVmConsoleResponse struct {
Error string
}
type ConnectToVmManagerRequest ¶ added in v0.3.3
The ConnectToVmManger RPC is fully streamed. After the request/response, the connection/client is hijacked and each side of the connection will send a stream of bytes.
type ConnectToVmManagerResponse ¶ added in v0.3.3
type ConnectToVmManagerResponse struct {
Error string
}
type ConnectToVmSerialPortRequest ¶
The ConnectToVmSerialPort RPC is fully streamed. After the request/response, the connection/client is hijacked and each side of the connection will send a stream of bytes.
type ConnectToVmSerialPortResponse ¶
type ConnectToVmSerialPortResponse struct {
Error string
}
type ConsoleType ¶
type ConsoleType uint
func (*ConsoleType) CheckValid ¶
func (consoleType *ConsoleType) CheckValid() error
func (ConsoleType) MarshalText ¶
func (consoleType ConsoleType) MarshalText() ([]byte, error)
func (*ConsoleType) Set ¶
func (consoleType *ConsoleType) Set(value string) error
func (ConsoleType) String ¶
func (consoleType ConsoleType) String() string
func (*ConsoleType) UnmarshalText ¶
func (consoleType *ConsoleType) UnmarshalText(text []byte) error
type CopyVmRequest ¶
type CopyVmResponse ¶
type CreateVmRequest ¶
type CreateVmRequest struct { DhcpTimeout time.Duration // <0: no DHCP; 0: no wait; >0 DHPC wait. DoNotStart bool EnableNetboot bool IdentityCertificate []byte // PEM encoded. IdentityKey []byte // PEM encoded. ImageDataSize uint64 ImageTimeout time.Duration MinimumFreeBytes uint64 OverlayDirectories []string OverlayFiles map[string][]byte RoundupPower uint64 SecondaryVolumes []Volume SecondaryVolumesData bool // Exclusive of SecondaryVolumesInit. SecondaryVolumesInit []VolumeInitialisationInfo SkipBootloader bool SkipMemoryCheck bool UserDataSize uint64 VmInfo } // The following data are streamed afterwards in the following order:
type CreateVmResponse ¶
type DebugVmImageRequest ¶ added in v0.3.2
type DebugVmImageRequest struct { DhcpTimeout time.Duration // <0: no DHCP; 0: no wait; >0 DHPC wait. ImageDataSize uint64 ImageName string ImageTimeout time.Duration ImageURL string IpAddress net.IP MinimumFreeBytes uint64 OverlayFiles map[string][]byte RoundupPower uint64 } // The following data are streamed afterwards in the following order:
type DebugVmImageResponse ¶ added in v0.3.2
type DeleteVmVolumeRequest ¶
type DeleteVmVolumeResponse ¶
type DeleteVmVolumeResponse struct {
Error string
}
type DestroyVmRequest ¶
type DestroyVmResponse ¶
type DestroyVmResponse struct {
Error string
}
type DiscardVmAccessTokenResponse ¶
type DiscardVmAccessTokenResponse struct {
Error string
}
type DiscardVmOldImageResponse ¶
type DiscardVmOldImageResponse struct {
Error string
}
type DiscardVmOldUserDataResponse ¶
type DiscardVmOldUserDataResponse struct {
Error string
}
type DiscardVmSnapshotResponse ¶
type DiscardVmSnapshotResponse struct {
Error string
}
type ExportLocalVmInfo ¶
type ExportLocalVmInfo struct { Bridges []string LocalVmInfo }
type ExportLocalVmRequest ¶
type ExportLocalVmResponse ¶
type ExportLocalVmResponse struct { Error string VmInfo ExportLocalVmInfo }
type GetCapacityRequest ¶ added in v0.3.4
type GetCapacityRequest struct{}
type GetCapacityResponse ¶ added in v0.3.4
type GetRootCookiePathRequest ¶
type GetRootCookiePathRequest struct{}
type GetUpdatesRequest ¶
type GetUpdatesRequest struct {
RegisterExternalLeasesRequest *RegisterExternalLeasesRequest
}
type GetVmAccessTokenRequest ¶
type GetVmInfoRequest ¶
type GetVmInfoResponse ¶
type GetVmLastPatchLogRequest ¶ added in v0.3.4
type GetVmLastPatchLogResponse ¶ added in v0.3.4
type GetVmUserDataRequest ¶
type GetVmUserDataResponse ¶
type GetVmVolumeRequest ¶
type GetVmVolumeResponse ¶
type HoldLockRequest ¶ added in v0.3.3
type HoldLockResponse ¶ added in v0.3.3
type HoldLockResponse struct {
Error string
}
type HoldVmLockRequest ¶ added in v0.3.3
type HoldVmLockResponse ¶ added in v0.3.3
type HoldVmLockResponse struct {
Error string
}
type ImportLocalVmRequest ¶
type ImportLocalVmResponse ¶
type ImportLocalVmResponse struct {
Error string
}
type ListSubnetsRequest ¶
type ListSubnetsRequest struct {
Sort bool
}
type ListSubnetsResponse ¶
type ListVMsRequest ¶
type ListVMsResponse ¶
type ListVolumeDirectoriesRequest ¶
type ListVolumeDirectoriesRequest struct{}
type LocalVmInfo ¶
type LocalVmInfo struct { VmInfo VolumeLocations []LocalVolume }
type LocalVolume ¶
type MigrateVmRequest ¶
type MigrateVmResponse ¶
type MigrateVmResponseResponse ¶
type MigrateVmResponseResponse struct {
Commit bool
}
type NetbootMachineRequest ¶
type NetbootMachineResponse ¶
type NetbootMachineResponse struct {
Error string
}
type PatchVmImageRequest ¶
type PatchVmImageResponse ¶
type PowerOffRequest ¶
type PowerOffRequest struct {
StopVMs bool // true: attempt to stop VMs; false: running VMs block poweroff
}
type PowerOffResponse ¶
type PowerOffResponse struct {
Error string
}
type PrepareVmForMigrationResponse ¶
type PrepareVmForMigrationResponse struct {
Error string
}
type ProbeVmPortRequest ¶
type ProbeVmPortResponse ¶
type RebootVmRequest ¶ added in v0.3.2
type RebootVmResponse ¶ added in v0.3.2
type RegisterExternalLeasesRequest ¶
type RegisterExternalLeasesRequest struct { Addresses AddressList Hostnames []string `json:",omitempty"` }
type RegisterExternalLeasesResponse ¶
type RegisterExternalLeasesResponse struct {
Error string
}
type ReorderVmVolumesRequest ¶ added in v0.3.2
type ReorderVmVolumesResponse ¶ added in v0.3.2
type ReorderVmVolumesResponse struct {
Error string
}
type ReplaceVmCredentialsRequest ¶ added in v0.3.3
type ReplaceVmCredentialsResponse ¶ added in v0.3.3
type ReplaceVmCredentialsResponse struct {
Error string
}
type ReplaceVmImageRequest ¶
type ReplaceVmImageRequest struct { DhcpTimeout time.Duration ImageDataSize uint64 ImageName string `json:",omitempty"` ImageTimeout time.Duration ImageURL string `json:",omitempty"` IpAddress net.IP MinimumFreeBytes uint64 OverlayFiles map[string][]byte RoundupPower uint64 SkipBackup bool SkipBootloader bool } // RAW image data (length=ImageDataSize) is streamed afterwards.
type ReplaceVmImageResponse ¶
type ReplaceVmUserDataResponse ¶
type ReplaceVmUserDataResponse struct {
Error string
}
type RestoreVmFromSnapshotResponse ¶
type RestoreVmFromSnapshotResponse struct {
Error string
}
type RestoreVmImageRequest ¶
type RestoreVmImageResponse ¶
type RestoreVmImageResponse struct {
Error string
}
type RestoreVmUserDataResponse ¶
type RestoreVmUserDataResponse struct {
Error string
}
type ScanVmRootResponse ¶
type ScanVmRootResponse struct { Error string FileSystem *filesystem.FileSystem }
type SetDisabledStateRequest ¶ added in v0.3.3
type SetDisabledStateRequest struct {
Disable bool
}
type SetDisabledStateResponse ¶ added in v0.3.3
type SetDisabledStateResponse struct {
Error string
}
type SnapshotVmRequest ¶
type SnapshotVmResponse ¶
type SnapshotVmResponse struct {
Error string
}
type StartVmRequest ¶
type StartVmResponse ¶
type StopVmRequest ¶
type StopVmResponse ¶
type StopVmResponse struct {
Error string
}
type Subnet ¶
type Subnet struct { Id string IpGateway net.IP IpMask net.IP // net.IPMask can't be JSON {en,de}coded. DomainName string `json:",omitempty"` DomainNameServers []net.IP DisableMetadata bool `json:",omitempty"` Manage bool `json:",omitempty"` VlanId uint `json:",omitempty"` AllowedGroups []string `json:",omitempty"` AllowedUsers []string `json:",omitempty"` FirstDynamicIP net.IP `json:",omitempty"` LastDynamicIP net.IP `json:",omitempty"` }
type TraceVmMetadataRequest ¶
type TraceVmMetadataResponse ¶
type TraceVmMetadataResponse struct { Error string } // A stream of strings (trace paths) follow.
type Update ¶
type Update struct { HaveAddressPool bool `json:",omitempty"` AddressPool []Address `json:",omitempty"` // Used & free. HaveDisabled bool `json:",omitempty"` Disabled bool `json:",omitempty"` MemoryInMiB *uint64 `json:",omitempty"` NumCPUs *uint `json:",omitempty"` NumFreeAddresses map[string]uint `json:",omitempty"` // Key: subnet ID. HealthStatus string `json:",omitempty"` HaveSerialNumber bool `json:",omitempty"` SerialNumber string `json:",omitempty"` HaveSubnets bool `json:",omitempty"` Subnets []Subnet `json:",omitempty"` TotalVolumeBytes *uint64 `json:",omitempty"` HaveVMs bool `json:",omitempty"` VMs map[string]*VmInfo `json:",omitempty"` // Key: IP address. }
type UpdateSubnetsRequest ¶
type UpdateSubnetsResponse ¶
type UpdateSubnetsResponse struct {
Error string
}
type VmInfo ¶
type VmInfo struct { Address Address ChangedStateOn time.Time `json:",omitempty"` ConsoleType ConsoleType `json:",omitempty"` CreatedOn time.Time `json:",omitempty"` DestroyOnPowerdown bool `json:",omitempty"` DestroyProtection bool `json:",omitempty"` DisableVirtIO bool `json:",omitempty"` ExtraKernelOptions string `json:",omitempty"` Hostname string `json:",omitempty"` IdentityExpires time.Time `json:",omitempty"` IdentityName string `json:",omitempty"` ImageName string `json:",omitempty"` ImageURL string `json:",omitempty"` MemoryInMiB uint64 MilliCPUs uint OwnerGroups []string `json:",omitempty"` OwnerUsers []string `json:",omitempty"` SpreadVolumes bool `json:",omitempty"` State State SecondaryAddresses []Address `json:",omitempty"` SecondarySubnetIDs []string `json:",omitempty"` SubnetId string `json:",omitempty"` Tags tags.Tags `json:",omitempty"` Uncommitted bool `json:",omitempty"` VirtualCPUs uint `json:",omitempty"` Volumes []Volume `json:",omitempty"` }
type Volume ¶
type Volume struct { Format VolumeFormat Size uint64 Type VolumeType }
type VolumeFormat ¶
type VolumeFormat uint
func (VolumeFormat) MarshalText ¶
func (volumeFormat VolumeFormat) MarshalText() ([]byte, error)
func (VolumeFormat) String ¶
func (volumeFormat VolumeFormat) String() string
func (*VolumeFormat) UnmarshalText ¶
func (volumeFormat *VolumeFormat) UnmarshalText(text []byte) error
type VolumeInitialisationInfo ¶ added in v0.3.2
type VolumeType ¶ added in v0.3.3
type VolumeType uint
func (VolumeType) MarshalText ¶ added in v0.3.3
func (volumeType VolumeType) MarshalText() ([]byte, error)
func (*VolumeType) Set ¶ added in v0.3.3
func (volumeType *VolumeType) Set(value string) error
func (VolumeType) String ¶ added in v0.3.3
func (volumeType VolumeType) String() string
func (*VolumeType) UnmarshalText ¶ added in v0.3.3
func (volumeType *VolumeType) UnmarshalText(text []byte) error
type WatchDhcpRequest ¶ added in v0.3.4
type WatchDhcpResponse ¶ added in v0.3.4
Click to show internal directories.
Click to hide internal directories.