Help us shape the future of Go! Take the 2026 Go Developer Survey

compute

package
v0.112.17 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUKind

type CPUKind string

CPUKind represents the type of compute.

const (
	ComputeKindSharedCPU      CPUKind = "shared"
	ComputeKindPerformanceCPU CPUKind = "performance"
)

type Compute

type Compute struct {
	Pool        *string  `json:"pool,omitempty" validate:"omitempty"`
	NumReplicas int      `json:"numReplicas" validate:"min=0,max=1000"`
	Regions     []Region `json:"regions,omitempty" validate:"omitempty"`
	CPUs        int      `json:"cpus" validate:"min=1,max=64"`
	CPUKind     CPUKind  `json:"computeKind" validate:"required,oneof=shared performance"`
	MemoryMB    int      `json:"memoryMb" validate:"min=256,max=65536"`
	// GPU-specific fields
	GPUKind *GPUKind `json:"gpuKind,omitempty" validate:"omitempty"`
	GPUs    *int     `json:"gpus,omitempty" validate:"omitempty,min=1,max=8"`
}

Compute is the base struct for different compute configurations.

func (*Compute) ComputeHash

func (c *Compute) ComputeHash() (string, error)

ComputeHash generates a SHA256 hash of the Compute configuration.

type Region

type Region = rest.ManagedWorkerRegion

Region represents a managed worker region

Jump to

Keyboard shortcuts

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