computerequest

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(cpus, memory int32, arch Arch) error

Types

type Arch

type Arch int
const (
	Amd64 Arch = iota + 1
	Arm64

	MaxResults = 20 // maximum number of VM types to fetch
)

func (Arch) String

func (a Arch) String() string

type ComputeRequestArgs

type ComputeRequestArgs struct {
	CPUs int32
	// CPUsRange       *Int32RangeFilter
	GPUs            int32
	GPUManufacturer string
	GPUModel        string
	MemoryGib       int32
	// MemoryRange     *Int32RangeFilter
	Arch       Arch
	NestedVirt bool
	// In case we want an specific type / size
	// we can set them directly
	ComputeSizes []string
}

type ComputeSelector

type ComputeSelector interface {
	Select(args *ComputeRequestArgs) ([]string, error)
}

type Int32RangeFilter

type Int32RangeFilter struct {
	UpperBound int32
	LowerBound int32
}

Jump to

Keyboard shortcuts

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