foreground

package
v0.10.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package foreground coordinates caller-visible task occupancy without owning durable task lifecycle state.

Index

Constants

View Source
const DefaultTimeoutMs = 120_000

Variables

This section is empty.

Functions

func ProjectionDetached

func ProjectionDetached(ctx context.Context) <-chan struct{}

ProjectionDetached returns a signal closed when foreground coordination has stopped projecting the current execution. A nil signal means no coordinator is attached.

Types

type CandidateInfo

type CandidateInfo struct {
	TaskID      string
	Kind        string
	Description string
	OutputFile  string
	StartedAt   time.Time
	Elapsed     time.Duration
}

CandidateInfo describes a process-local foreground execution that may be handed off to background ownership. TaskID is pre-allocated for correlation; no backgroundtask.Task exists until a handoff callback submits one.

type Policy

type Policy struct {
	TimeoutMs            int
	ShouldAutoBackground func(context.Context, *CandidateInfo) bool
}

Policy configures foreground occupancy independently from task persistence.

Jump to

Keyboard shortcuts

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