Documentation
¶
Overview ¶
Package background supervises workflow steps marked `background: true`: a step starts and the workflow continues while Atmos keeps it alive, later waiting for it to become ready (`wait`/`wait-all`) or tearing it down (`cancel`).
The package is intentionally generic. v1 ships a single container-backed Runner (the container runtime is the supervisor, so no goroutine is needed); a future shell/process Runner can implement the same Runner/Handle interfaces — backed by a goroutine and a readiness probe — without changing the workflow orchestration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle interface {
// Name is the step name the background step was registered under.
Name() string
// WaitReady blocks until the background step is ready to use — for a container
// service, until its health check passes — or returns immediately when no
// readiness is configured. A service that reports terminally unhealthy fails fast.
WaitReady(ctx context.Context) error
// Stop gracefully tears the background step down (for a container, stop+remove).
Stop(ctx context.Context) error
}
Handle supervises a single running background step.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry tracks the background steps started during one workflow run, keyed by step name. It is safe for concurrent use.
func (*Registry) Names ¶
Names returns the still-registered background step names in registration order.
func (*Registry) Register ¶
Register records a started handle under its name, preserving first-seen order.