Documentation
¶
Index ¶
- Constants
- type AllocateRequest
- type AllocateRequestEntry
- type AllocateResponse
- type Allocation
- type AllocationDeletionReason
- type AllocationUpdate
- type AllocationUpdateEntry
- type CancelAllocationRequest
- type CancelAllocationResponse
- type ChangeMachineTagsRequest
- type ChangeMachineTagsResponse
- type DeletedAllocation
- type GetAllocationUpdatesRequest
- type GetHypervisorForVMRequest
- type GetHypervisorForVMResponse
- type GetHypervisorsInLocationRequest
- type GetHypervisorsInLocationResponse
- type GetIpInfoRequest
- type GetIpInfoResponse
- type GetMachineInfoRequest
- type GetMachineInfoResponse
- type GetUpdatesRequest
- type HardwareAddr
- type Hypervisor
- type HypervisorData
- type ListHypervisorLocationsRequest
- type ListHypervisorLocationsResponse
- type ListHypervisorsInLocationRequest
- type ListHypervisorsInLocationResponse
- type ListVMsInLocationRequest
- type ListVMsInLocationResponse
- type Machine
- type MoveIpAddressesRequest
- type MoveIpAddressesResponse
- type NetworkEntry
- type NetworkInterfaceSpecification
- type PowerOnMachineRequest
- type PowerOnMachineResponse
- type RequestId
- type Update
- type VmAllocation
- type VmAllocationSpecification
- type VolumeSpecification
Constants ¶
const ( AllocationRequestError = AllocationDeletionReason(0) AllocationRequestCompleted = AllocationDeletionReason(1) AllocationRequestCancelled = AllocationDeletionReason(2) AllocationRequestCannotFit = AllocationDeletionReason(3) AllocationRequestExpired = AllocationDeletionReason(4) AllocationRequestCreateTimeout = AllocationDeletionReason(5) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocateRequest ¶ added in v0.14.0
type AllocateRequest struct {
Deadline time.Time
// Placement
// Priority uint
VMs []VmAllocationSpecification
}
The Allocation RPC is experimental and subject to change without notice.
type AllocateRequestEntry ¶ added in v0.14.0
type AllocateRequestEntry struct {
Request AllocateRequest
RequestId RequestId
Username types.Username
}
This type is experimental and subject to change without notice.
type AllocateResponse ¶ added in v0.14.0
type Allocation ¶ added in v0.14.0
type Allocation struct {
CreateDeadline time.Time
VMs []VmAllocation
}
This type is experimental and subject to change without notice.
type AllocationDeletionReason ¶ added in v0.14.0
type AllocationDeletionReason uint
This type is experimental and subject to change without notice.
func (AllocationDeletionReason) MarshalText ¶ added in v0.14.0
func (reason AllocationDeletionReason) MarshalText() ([]byte, error)
func (AllocationDeletionReason) String ¶ added in v0.14.0
func (reason AllocationDeletionReason) String() string
func (*AllocationDeletionReason) UnmarshalText ¶ added in v0.14.0
func (reason *AllocationDeletionReason) UnmarshalText(text []byte) error
type AllocationUpdate ¶ added in v0.14.0
type AllocationUpdate struct {
AllocationUpdateEntry
Error string `json:",omitempty"`
Position uint64
}
type AllocationUpdateEntry ¶ added in v0.14.0
type AllocationUpdateEntry struct {
Available *Allocation `json:",omitempty"`
Deleted *DeletedAllocation `json:",omitempty"`
Request *AllocateRequest `json:",omitempty"` // Not for deleted allocs.
RequestId RequestId
Timestamp time.Time
Username types.Username
}
This type is experimental and subject to change without notice.
type CancelAllocationRequest ¶ added in v0.14.0
type CancelAllocationRequest struct {
RequestId RequestId
}
The CancelAllocation RPC is experimental and subject to change without notice.
type CancelAllocationResponse ¶ added in v0.14.0
type CancelAllocationResponse struct {
Error string
}
type ChangeMachineTagsResponse ¶
type ChangeMachineTagsResponse struct {
Error string
}
type DeletedAllocation ¶ added in v0.14.0
type DeletedAllocation struct {
Error string `json:",omitempty"`
Reason AllocationDeletionReason `json:",omitempty"`
}
This type is experimental and subject to change without notice.
type GetAllocationUpdatesRequest ¶ added in v0.14.0
type GetHypervisorsInLocationRequest ¶ added in v0.3.3
type GetHypervisorsInLocationResponse ¶ added in v0.3.3
type GetHypervisorsInLocationResponse struct {
Error string
Hypervisors []Hypervisor `json:",omitempty"`
}
type GetIpInfoRequest ¶ added in v0.8.0
type GetIpInfoResponse ¶ added in v0.8.0
type GetMachineInfoRequest ¶
type GetMachineInfoResponse ¶
type GetUpdatesRequest ¶
type HardwareAddr ¶
type HardwareAddr net.HardwareAddr
func (HardwareAddr) MarshalText ¶
func (addr HardwareAddr) MarshalText() (text []byte, err error)
func (HardwareAddr) String ¶
func (addr HardwareAddr) String() string
func (*HardwareAddr) UnmarshalText ¶
func (addr *HardwareAddr) UnmarshalText(text []byte) error
type Hypervisor ¶ added in v0.3.3
type Hypervisor struct {
HypervisorData
Machine
VMs []proto.VmInfo `json:",omitempty"`
}
type HypervisorData ¶ added in v0.12.0
type HypervisorData struct {
AllocatedMilliCPUs uint64 `json:",omitempty"`
AllocatedMemory uint64 `json:",omitempty"` // MiB.
AllocatedVolumeBytes uint64 `json:",omitempty"`
AvailableMemory uint64 `json:",omitempty"` // MiB.
NumFreeAddresses map[string]uint `json:",omitempty"` // Key: subnet ID.
}
func (*HypervisorData) Equal ¶ added in v0.12.0
func (left *HypervisorData) Equal(right *HypervisorData) bool
type ListHypervisorLocationsRequest ¶
type ListHypervisorLocationsRequest struct {
TopLocation string
}
type ListVMsInLocationResponse ¶
A stream of ListVMsInLocationResponse messages is sent, until either the length of the IpAddresses field is zero, or the Error field != "".
type Machine ¶
type Machine struct {
GatewaySubnetId string `json:",omitempty"`
IPMI NetworkEntry `json:",omitempty"`
Location string `json:",omitempty"`
MemoryInMiB uint64 `json:",omitempty"`
NetworkEntry `json:",omitempty"`
NumCPUs uint `json:",omitempty"`
OwnerGroups []string `json:",omitempty"`
OwnerUsers []string `json:",omitempty"`
SecondaryNetworkEntries []NetworkEntry `json:",omitempty"`
Tags tags.Tags `json:",omitempty"`
TotalVolumeBytes uint64 `json:",omitempty"`
}
type MoveIpAddressesRequest ¶
type MoveIpAddressesResponse ¶
type MoveIpAddressesResponse struct {
Error string
}
type NetworkEntry ¶
type NetworkEntry struct {
Hostname string `json:",omitempty"`
HostIpAddress net.IP `json:",omitempty"`
HostMacAddress HardwareAddr `json:",omitempty"`
SubnetId string `json:",omitempty"`
VlanTrunk bool `json:",omitempty"`
}
func (*NetworkEntry) Equal ¶
func (left *NetworkEntry) Equal(right *NetworkEntry) bool
type NetworkInterfaceSpecification ¶ added in v0.14.0
type NetworkInterfaceSpecification struct {
SubnetId string
}
This type is experimental and subject to change without notice.
type PowerOnMachineRequest ¶
type PowerOnMachineRequest struct {
Hostname string
}
type PowerOnMachineResponse ¶
type PowerOnMachineResponse struct {
Error string
}
type RequestId ¶ added in v0.14.0
type RequestId string
This type is experimental and subject to change without notice.
type Update ¶
type Update struct {
ChangedHypervisors map[string]HypervisorData `json:",omitempty"` // Key: hostname.
ChangedMachines []*Machine `json:",omitempty"`
ChangedVMs map[string]*proto.VmInfo `json:",omitempty"` // Key: IPaddr
DeletedMachines []string `json:",omitempty"` // Hostname
DeletedVMs []string `json:",omitempty"` // IPaddr
Error string `json:",omitempty"`
VmToHypervisor map[string]string `json:",omitempty"` // IP:hostname
}
type VmAllocation ¶ added in v0.14.0
type VmAllocation struct {
HypervisorAddress string // host:port
}
This type is experimental and subject to change without notice.
type VmAllocationSpecification ¶ added in v0.14.0
type VmAllocationSpecification struct {
// CpuType? MachineType?
HypervisorTagsToMatch tags.MatchTags // Empty: match all tags.
Location string `json:",omitempty"`
MemoryInMiB uint64
MilliCPUs uint
NetworkInterfaces []NetworkInterfaceSpecification
Volumes []VolumeSpecification
}
This type is experimental and subject to change without notice.
type VolumeSpecification ¶ added in v0.14.0
type VolumeSpecification struct {
Size types.Bytes
Type hyper_proto.VolumeType
}
This type is experimental and subject to change without notice.