computerequest

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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