Documentation
¶
Overview ¶
Package orchestrationstate shares atomic child retention across store backends.
Index ¶
- func ClaimContinuation(ctx context.Context, driver Driver, team id.OrchestrationID) (*orchestration.Run, error)
- func Link(ctx context.Context, driver Driver, team id.OrchestrationID, ...) error
- func Update(ctx context.Context, driver Driver, record *orchestration.Run) error
- type Driver
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimContinuation ¶
func ClaimContinuation(ctx context.Context, driver Driver, team id.OrchestrationID) (*orchestration.Run, error)
ClaimContinuation elects one strategy pass from a durable waiting state.
func Link ¶
func Link(ctx context.Context, driver Driver, team id.OrchestrationID, child id.AgentRunID) error
Link admits an identity once, while the parent is still running.
Types ¶
type Driver ¶
type Driver interface {
Read(context.Context, id.OrchestrationID) (Snapshot, error)
CompareAndSwap(context.Context, Snapshot, *orchestration.Run) (bool, error)
}
Driver reads at the caller's exact scope and conditionally replaces a row. A false result means no write occurred. Errors may include uncertain writes.
type Snapshot ¶
type Snapshot struct {
Run *orchestration.Run
Revision int64
}
Snapshot pairs a detached execution record with its storage revision.
Click to show internal directories.
Click to hide internal directories.