computerequest

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 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
	MaxCPUs 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
	// ComputeFamilies is an optional allowlist of compute family prefixes used to post-filter
	// instance/VM types returned by the compute selector.
	// AWS: family prefixes (e.g., "m5", "c6i", "r7a"). Dot-separator enforced: "m5" matches
	//      "m5.xlarge" but not "m5a.xlarge".
	// Azure: family prefixes without "Family" suffix (e.g., "D8v3", "E16v4"). Matches SKUs
	//        like "StandardD8v3Family".
	// Empty list = no restriction. Only used when ComputeSizes is empty.
	ComputeFamilies []string
	// Disk size in GB, nil means use provider default
	DiskSize *int
}

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