orchestrator

package
v0.0.0-...-7363dd6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSandboxNotFound        = errors.New("sandbox not found")
	ErrAccessForbidden        = errors.New("access forbidden")
	ErrSandboxOperationFailed = errors.New("sandbox operation failed")
)
View Source
var ErrNodeNotFound = errors.New("node not found")

Functions

This section is empty.

Types

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	config cfg.Config,
	tel *telemetry.Client,
	nomadClient *nomadapi.Client,
	posthogClient *analyticscollector.PosthogClient,
	redisClient redis.UniversalClient,
	dbClient *db.DB,
	sqlcDB *sqlcdb.Client,
	clusters *edge.Pool,
	featureFlags *featureflags.Client,
) (*Orchestrator, error)

func (*Orchestrator) AdminNodeDetail

func (o *Orchestrator) AdminNodeDetail(clusterID uuid.UUID, nodeIDOrNomadNodeShortID string) (*api.NodeDetail, error)

func (*Orchestrator) AdminNodes

func (o *Orchestrator) AdminNodes() []*api.Node

func (*Orchestrator) Close

func (o *Orchestrator) Close(ctx context.Context) error

func (*Orchestrator) CreateSandbox

func (o *Orchestrator) CreateSandbox(
	ctx context.Context,
	sandboxID,
	executionID,
	alias string,
	team authcache.AuthTeamInfo,
	build queries.EnvBuild,
	metadata map[string]string,
	envVars map[string]string,
	startTime time.Time,
	endTime time.Time,
	timeout time.Duration,
	isResume bool,
	nodeID *string,
	baseTemplateID string,
	autoPause bool,
	envdAuthToken *string,
	allowInternetAccess *bool,
) (*api.Sandbox, *api.APIError)

func (*Orchestrator) GetClient

func (o *Orchestrator) GetClient(ctx context.Context, clusterID uuid.UUID, nodeID string) (*grpclient.GRPCClient, context.Context, error)

func (*Orchestrator) GetClusterNodes

func (o *Orchestrator) GetClusterNodes(clusterID uuid.UUID) []*nodemanager.Node

func (*Orchestrator) GetNode

func (o *Orchestrator) GetNode(clusterID uuid.UUID, nodeID string) *nodemanager.Node

func (*Orchestrator) GetNodeByIDOrNomadShortID deprecated

func (o *Orchestrator) GetNodeByIDOrNomadShortID(clusterID uuid.UUID, nodeIDOrNomadNodeShortID string) *nodemanager.Node

Deprecated: use GetNode instead

func (*Orchestrator) GetNodeByNomadShortID deprecated

func (o *Orchestrator) GetNodeByNomadShortID(id string) *nodemanager.Node

Deprecated: use GetNode instead

func (*Orchestrator) GetSandbox

func (o *Orchestrator) GetSandbox(sandboxID string, includeEvicting bool) (sandbox.Sandbox, error)

func (*Orchestrator) GetSandboxes

func (o *Orchestrator) GetSandboxes(ctx context.Context, teamID *uuid.UUID, states []sandbox.State) map[sandbox.State][]sandbox.Sandbox

GetSandboxes returns all instances for a given node.

func (*Orchestrator) KeepAliveFor

func (o *Orchestrator) KeepAliveFor(ctx context.Context, sandboxID string, duration time.Duration, allowShorter bool) *api.APIError

func (*Orchestrator) NodeCount

func (o *Orchestrator) NodeCount() int

func (*Orchestrator) RemoveSandbox

func (o *Orchestrator) RemoveSandbox(ctx context.Context, sbx sandbox.Sandbox, stateAction sandbox.StateAction) error

func (*Orchestrator) UpdateSandbox

func (o *Orchestrator) UpdateSandbox(
	ctx context.Context,
	sandboxID string,
	endTime time.Time,
	clusterID uuid.UUID,
	nodeID string,
) error

func (*Orchestrator) WaitForStateChange

func (o *Orchestrator) WaitForStateChange(ctx context.Context, sandboxID string) error

type PauseQueueExhaustedError

type PauseQueueExhaustedError struct{}

func (PauseQueueExhaustedError) Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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