template

package
v0.1.3-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTemplateImage       = "sandbox0ai/otemplates:default-v0.1.0"
	DefaultTemplateCPU         = "500m"
	DefaultTemplateMemory      = "512Mi"
	DefaultTemplateDisplayName = "Default"
	DefaultTemplateMinIdle     = int32(1)
	DefaultTemplateMaxIdle     = int32(5)
)

Variables

This section is empty.

Functions

func ApplyDefaultPool

func ApplyDefaultPool(minIdle, maxIdle int32) (int32, int32)

ApplyDefaultPool applies default pool values when not explicitly set.

Types

type Cluster

type Cluster struct {
	ClusterID          string     `json:"cluster_id"`
	ClusterName        string     `json:"cluster_name"`
	InternalGatewayURL string     `json:"internal_gateway_url"`
	Weight             int        `json:"weight"`
	Enabled            bool       `json:"enabled"`
	LastSeenAt         *time.Time `json:"last_seen_at,omitempty"`
	CreatedAt          time.Time  `json:"created_at"`
	UpdatedAt          time.Time  `json:"updated_at"`
}

Cluster represents a registered data-plane cluster.

type Template

type Template struct {
	TemplateID string                          `json:"template_id"`
	Scope      string                          `json:"scope"`             // public, team
	TeamID     string                          `json:"team_id,omitempty"` // only for scope=team
	UserID     string                          `json:"user_id,omitempty"` // creator/updater user id (best-effort)
	Spec       v1alpha1.SandboxTemplateSpec    `json:"spec"`
	Status     *v1alpha1.SandboxTemplateStatus `json:"status,omitempty"`
	CreatedAt  time.Time                       `json:"created_at"`
	UpdatedAt  time.Time                       `json:"updated_at"`
}

Template represents a SandboxTemplate stored in PostgreSQL.

type TemplateAllocation

type TemplateAllocation struct {
	TemplateID   string     `json:"template_id"`
	Scope        string     `json:"scope"`             // public, team
	TeamID       string     `json:"team_id,omitempty"` // only for scope=team
	ClusterID    string     `json:"cluster_id"`
	MinIdle      int32      `json:"min_idle"`
	MaxIdle      int32      `json:"max_idle"`
	LastSyncedAt *time.Time `json:"last_synced_at,omitempty"`
	SyncStatus   string     `json:"sync_status"`
	SyncError    *string    `json:"sync_error,omitempty"`
	CreatedAt    time.Time  `json:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at"`
}

TemplateAllocation represents how a template is allocated to a cluster.

Directories

Path Synopsis
pg

Jump to

Keyboard shortcuts

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