orchestrationstate

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package orchestrationstate shares atomic child retention across store backends.

Index

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(ctx context.Context, driver Driver, team id.OrchestrationID, child id.AgentRunID) error

Link admits an identity once, while the parent is still running.

func Update

func Update(ctx context.Context, driver Driver, record *orchestration.Run) error

Update retains every child observed by any writer and never reopens a team.

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.

Jump to

Keyboard shortcuts

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