runstate

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package runstate defines the execution-state port used by the runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

type Attempt interface {
	ID() string
	Open(ctx context.Context) error
	RecordStatus(ctx context.Context, status ir.DAGRunStatus) error
	RecordOutputs(ctx context.Context, outputs *ir.DAGRunOutputs) error
	ReadStatus(ctx context.Context) (*ir.DAGRunStatus, error)
	ReadOutputs(ctx context.Context) (*ir.DAGRunOutputs, error)
	RequestCancel(ctx context.Context) error
	CancelRequested(ctx context.Context) (bool, error)
	ReadStepMessages(ctx context.Context, stepName string) ([]ir.LLMMessage, error)
	WriteStepMessages(ctx context.Context, stepName string, messages []ir.LLMMessage) error
	MaterializeWorkDir(ctx context.Context) (string, error)
	SnapshotWorkDir(ctx context.Context, localDir string) error
	Close(ctx context.Context) error
}

Attempt records and reads state for a single workflow execution attempt.

func NewNoopAttempt added in v2.14.0

func NewNoopAttempt(req BeginAttemptRequest) Attempt

NewNoopAttempt creates execution state for a run persisted outside this process.

type BeginAttemptRequest

type BeginAttemptRequest struct {
	DAG        *ir.DAG
	RunID      string
	AttemptID  string
	Retry      bool
	RootDAGRun ir.DAGRunRef
}

BeginAttemptRequest describes the workflow run attempt to open for execution.

type Store

type Store interface {
	BeginAttempt(ctx context.Context, req BeginAttemptRequest) (Attempt, error)
	OpenAttempt(ctx context.Context, ref ir.DAGRunRef) (Attempt, error)
	OpenChildAttempt(ctx context.Context, root ir.DAGRunRef, childRunID string) (Attempt, error)
}

Store opens execution state for workflow runs.

Directories

Path Synopsis
Package memstore provides an in-memory runtime run-state store.
Package memstore provides an in-memory runtime run-state store.

Jump to

Keyboard shortcuts

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