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 CommitImportedVmRequest
- type CommitImportedVmResponse
- type ConnectToVmConsoleRequest
- type ConnectToVmConsoleResponse
- type ConnectToVmSerialPortRequest
- type ConnectToVmSerialPortResponse
- type ConsoleType
- type CopyVmRequest
- type CopyVmResponse
- type CreateVmRequest
- type CreateVmResponse
- 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 GetRootCookiePathRequest
- type GetRootCookiePathResponse
- type GetUpdatesRequest
- type GetVmAccessTokenRequest
- type GetVmAccessTokenResponse
- type GetVmInfoRequest
- type GetVmInfoResponse
- type GetVmUserDataRequest
- type GetVmUserDataResponse
- type GetVmVolumeRequest
- type GetVmVolumeResponse
- 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 RegisterExternalLeasesRequest
- type RegisterExternalLeasesResponse
- 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 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
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 VolumeFormatRaw = 0 VolumeFormatQCOW2 = 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 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 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. EnableNetboot bool ImageDataSize uint64 ImageTimeout time.Duration MinimumFreeBytes uint64 RoundupPower uint64 SecondaryVolumes []Volume SecondaryVolumesData bool SkipBootloader bool UserDataSize uint64 VmInfo } // The following data are streamed afterwards in the following order:
type CreateVmResponse ¶
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 GetRootCookiePathRequest ¶
type GetRootCookiePathRequest struct{}
type GetUpdatesRequest ¶
type GetUpdatesRequest struct {
RegisterExternalLeasesRequest *RegisterExternalLeasesRequest
}
type GetVmAccessTokenRequest ¶
type GetVmInfoRequest ¶
type GetVmInfoResponse ¶
type GetVmUserDataRequest ¶
type GetVmUserDataResponse ¶
type GetVmVolumeRequest ¶
type GetVmVolumeResponse ¶
type GetVmVolumeResponse 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 RegisterExternalLeasesRequest ¶
type RegisterExternalLeasesRequest struct { Addresses AddressList Hostnames []string `json:",omitempty"` }
type RegisterExternalLeasesResponse ¶
type RegisterExternalLeasesResponse 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 RoundupPower uint64 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 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. 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"` 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 ConsoleType ConsoleType `json:",omitempty"` DestroyProtection bool `json:",omitempty"` DisableVirtIO bool `json:",omitempty"` Hostname 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 Tags tags.Tags `json:",omitempty"` SecondaryAddresses []Address `json:",omitempty"` SecondarySubnetIDs []string `json:",omitempty"` SubnetId string `json:",omitempty"` Uncommitted bool `json:",omitempty"` VirtualCPUs uint `json:",omitempty"` Volumes []Volume `json:",omitempty"` }
type Volume ¶
type Volume struct { Size uint64 Format VolumeFormat }
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
Click to show internal directories.
Click to hide internal directories.