fleetmanager

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 20

Documentation

Index

Constants

View Source
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 AllocateResponse struct {
	Error          string
	RequestId      RequestId
	UpdatePosition uint64
}

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 ChangeMachineTagsRequest

type ChangeMachineTagsRequest struct {
	Hostname string
	Tags     tags.Tags
}

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 GetAllocationUpdatesRequest struct {
	IncludeRequests bool      // If true: include original allocation requests.
	Position        uint64    // The position of the first update to receive.
	MaxUpdates      uint64    // Zero means infinite.
	UntilRequestId  RequestId // Empty means infinite.
}

type GetHypervisorForVMRequest

type GetHypervisorForVMRequest struct {
	IpAddress net.IP
}

type GetHypervisorForVMResponse

type GetHypervisorForVMResponse struct {
	HypervisorAddress string // host:port
	Error             string
}

type GetHypervisorsInLocationRequest added in v0.3.3

type GetHypervisorsInLocationRequest struct {
	HypervisorTagsToMatch tags.MatchTags // Empty: match all tags.
	IncludeUnhealthy      bool
	IncludeVMs            bool
	Location              string
	SubnetId              string
}

type GetHypervisorsInLocationResponse added in v0.3.3

type GetHypervisorsInLocationResponse struct {
	Error       string
	Hypervisors []Hypervisor `json:",omitempty"`
}

type GetIpInfoRequest added in v0.8.0

type GetIpInfoRequest struct {
	IpAddress net.IP
}

type GetIpInfoResponse added in v0.8.0

type GetIpInfoResponse struct {
	HypervisorAddress string // host:port
	Error             string
	VM                *proto.VmInfo `json:",omitempty"`
}

type GetMachineInfoRequest

type GetMachineInfoRequest struct {
	Hostname               string
	IgnoreMissingLocalTags bool
}

type GetMachineInfoResponse

type GetMachineInfoResponse struct {
	Error    string          `json:",omitempty"`
	Location string          `json:",omitempty"`
	Machine  Machine         `json:",omitempty"`
	Subnets  []*proto.Subnet `json:",omitempty"`
}

type GetUpdatesRequest

type GetUpdatesRequest struct {
	IgnoreMissingLocalTags bool
	Location               string
	MaxUpdates             uint64 // Zero means infinite.
}

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 ListHypervisorLocationsResponse

type ListHypervisorLocationsResponse struct {
	Locations []string
	Error     string
}

type ListHypervisorsInLocationRequest

type ListHypervisorsInLocationRequest struct {
	HypervisorTagsToMatch tags.MatchTags // Empty: match all tags.
	IncludeUnhealthy      bool
	Location              string
	SubnetId              string
	TagsToInclude         []string
}

type ListHypervisorsInLocationResponse

type ListHypervisorsInLocationResponse struct {
	Error               string
	HypervisorAddresses []string    // host:port
	TagsForHypervisors  []tags.Tags `json:",omitempty"`
}

type ListVMsInLocationRequest

type ListVMsInLocationRequest struct {
	HypervisorTagsToMatch tags.MatchTags // Empty: match all tags.
	Location              string
	OwnerGroups           []string
	OwnerUsers            []string
	VmTagsToMatch         tags.MatchTags // Empty: match all tags.
}

type ListVMsInLocationResponse

type ListVMsInLocationResponse struct {
	IpAddresses []net.IP
	Error       string
}

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"`
}

func (*Machine) Equal

func (left *Machine) Equal(right *Machine) bool

type MoveIpAddressesRequest

type MoveIpAddressesRequest struct {
	HypervisorHostname string
	IpAddresses        []net.IP
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL