runstate

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runstate encodes storage states that fence unsupported workers.

Index

Constants

View Source
const PausedPrepared = "paused_prepared"

PausedPrepared is deliberately unknown to readers predating preparation. Their atomic resume and expiry claims match only the literal paused state.

Variables

This section is empty.

Functions

func Decode

func Decode(stored string) run.State

Decode restores the public state understood by preparation-aware workers.

func Encode

func Encode(r *run.Run) string

Encode protects prepared pauses while retaining the public lifecycle.

func NextRevision

func NextRevision(current int64) (int64, error)

NextRevision rejects invalid or exhausted versions without wrapping around.

func UpdateConflict

func UpdateConflict(ctx context.Context, reader interface {
	GetRun(context.Context, id.AgentRunID) (*run.Run, error)
}, scope cortex.Scope, runID id.AgentRunID) error

UpdateConflict classifies a failed conditional write without exposing a run outside the exact caller scope. The read is diagnostic, never write authority.

Types

This section is empty.

Jump to

Keyboard shortcuts

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