execution

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package execution handles the various kinds of execution for workspace runs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAgentExecutionModeWithoutPool = errors.New("agent execution mode requires agent pool ID")
	ErrNonAgentExecutionModeWithPool = errors.New("agent pool ID can only be specified with agent execution mode")
)

Functions

This section is empty.

Types

type Kind

type Kind string

Kind of execution for workspace run.

const (
	// RemoteKind executes the run via the otf server, otfd.
	RemoteKind Kind = "remote"
	// LocalKind executes the run on the user's local machine
	LocalKind Kind = "local"
	// AgentKind executes the run via the agent, otf-agent.
	AgentKind Kind = "agent"
)

type Mode

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

Mode of execution for workspace run, combining execution kind and any additional data relating to kind.

func AgentMode

func AgentMode(poolID resource.TfeID) Mode

func LocalMode

func LocalMode() Mode

func NewMode

func NewMode(kind Kind, agentPoolID *resource.TfeID) (Mode, error)

func NewModeWithDefaults

func NewModeWithDefaults(overrideKind *Kind, defaultKind Kind, overrideAgentPoolID, defaultAgentPoolID *resource.TfeID) (Mode, error)

func RemoteMode

func RemoteMode() Mode

func (Mode) AgentPoolID

func (m Mode) AgentPoolID() *resource.TfeID

func (Mode) Kind

func (m Mode) Kind() Kind

func (*Mode) Update

func (m *Mode) Update(kind *Kind, agentPoolID *resource.TfeID) error

Update the mode and/or agent pool ID. An error is returned if an invalid combination is provided. True is returned if something was set.

Jump to

Keyboard shortcuts

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