runexec

package
v0.193.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 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

Overview

Package runexec coordinates governed command operations without CLI policy.

Index

Constants

View Source
const AdmissionGrace = 200 * time.Millisecond
View Source
const Heartbeat = 10 * time.Second

Variables

This section is empty.

Functions

func LoadHint

func LoadHint(configPath string) string

func Queue

func Queue(request QueueRequest) runqueue.QueueListing

Types

type ChangedOperations

type ChangedOperations struct {
	Getwd         func() (string, error)
	DefaultBranch func(string) string
	Packages      func(context.Context, string, string) (quality.ChangedPackagesResult, error)
}

func (ChangedOperations) Run

type ChangedRequest

type ChangedRequest struct {
	Argv   []string
	Target string
}

type ChangedResult

type ChangedResult struct {
	Argv, Packages        []string
	Target, MergeBase     string
	MissingTarget, NoWork bool
}

func Changed

func Changed(ctx context.Context, request ChangedRequest) (ChangedResult, error)

type ExecuteRequest

type ExecuteRequest struct {
	Argv                     []string
	ProjectsRoot, ConfigPath string
	AllowSaturatedHost       bool
	Stdin                    io.Reader
	Stdout, Stderr           io.Writer
	Observe                  func(QueueEvent)
	// contains filtered or unexported fields
}

type ExecuteResult

type ExecuteResult struct {
	ExitCode    int
	ChildFailed bool
}

func Execute

func Execute(ctx context.Context, request ExecuteRequest) (ExecuteResult, error)

type Executor

type Executor struct {
	QueueHeartbeat, CourtesyHeartbeat time.Duration
	// contains filtered or unexported fields
}

Executor's durations configure this invocation; zero uses production defaults. There are no process-global test overrides.

func (Executor) Run

func (executor Executor) Run(ctx context.Context, request ExecuteRequest) (ExecuteResult, error)

type HistoryOperations

type HistoryOperations struct {
	Getwd func() (string, error)
	Read  func(string) ([]runlog.Event, string, error)
	Now   func() time.Time
}

func (HistoryOperations) Run

type HistoryRequest

type HistoryRequest struct{ Days int }

type HistoryResult

type HistoryResult struct {
	Summary runlog.Summary
	Path    string
	Days    int
}

func History

func History(ctx context.Context, request HistoryRequest) (HistoryResult, error)

type QueueEvent

type QueueEvent struct {
	Kind            QueueEventKind
	Summary         string
	State           runqueue.State
	Waited, Elapsed time.Duration
	ExitCode        int
	At              time.Time
}

type QueueEventKind

type QueueEventKind uint8
const (
	ImmediatelyAdmitted QueueEventKind = iota
	Queued
	WaitingHeartbeat
	AdmittedAfterWait
	Done
	CourtesyRunning
)

type QueueRequest

type QueueRequest struct{ ProjectsRoot string }

type RecipeBucket

type RecipeBucket uint8
const (
	Updated RecipeBucket = iota
	Skipped
	Archived
	Forked
	Failed
)

type RecipeEvent

type RecipeEvent struct {
	DryRun bool
	Row    RecipeRow
}

type RecipeFailure

type RecipeFailure struct {
	Discovery, Unknown bool
	Err                error
}

RecipeFailure identifies the existing diagnostic prefix without CLI exit types.

func (*RecipeFailure) Error

func (failure *RecipeFailure) Error() string

func (*RecipeFailure) Unwrap

func (failure *RecipeFailure) Unwrap() error

type RecipeOperations

type RecipeOperations struct {
	LoadConfig    func(string) (recipe.Config, error)
	Discover      func(string, string, []string) ([]discover.Repo, error)
	DefaultBranch func(string) (string, error)
	Fetch         func(string) error
	Land          func(recipe.Recipe, string, string) (gitops.Outcome, error)
}

func NewRecipes

func NewRecipes(discoverRepos func(string, string, []string) ([]discover.Repo, error)) RecipeOperations

func (RecipeOperations) Run

type RecipeRequest

type RecipeRequest struct {
	ProjectsRoot, Filter, ConfigPath, Name string
	ExtraOrgs                              []string
	List, Apply                            bool
	// Observe renders warnings and rows before further effects; required for named runs.
	Observe func(RecipeEvent) error
}

type RecipeResult

type RecipeResult struct {
	Names           []string
	Rows            []RecipeRow
	Drift, Findings bool
}

type RecipeRow

type RecipeRow struct {
	Bucket RecipeBucket
	Text   string
}

type Submission

type Submission struct {
	WorkingDirectory         string
	Argv                     []string
	WorkerID, IdempotencyKey string
}

type SubmissionOperations

type SubmissionOperations struct {
	Getwd func() (string, error)
	Send  func(context.Context, SubmitRequest, Submission) (operationreceipt.Receipt, error)
}

SubmissionOperations binds the actual authenticated transport at composition.

func (SubmissionOperations) Run

type SubmitRequest

type SubmitRequest struct {
	ProjectsRoot             string
	Argv                     []string
	WorkerID, IdempotencyKey string
	Stderr                   io.Writer
}

Jump to

Keyboard shortcuts

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