compute

package
v0.110.18 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

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

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