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 ¶
func WithPreparedAttempt ¶
func WithPreparedAttempt(attempt exec.DAGRunAttempt) historyStoreOption
WithPreparedAttempt reuses an attempt that was opened by Dagu before runtime execution.
Types ¶
type Attempt ¶
type Attempt interface {
ID() string
Open(ctx context.Context) error
RecordStatus(ctx context.Context, status exec.DAGRunStatus) error
RecordOutputs(ctx context.Context, outputs *exec.DAGRunOutputs) error
ReadStatus(ctx context.Context) (*exec.DAGRunStatus, error)
ReadOutputs(ctx context.Context) (*exec.DAGRunOutputs, error)
RequestCancel(ctx context.Context) error
CancelRequested(ctx context.Context) (bool, error)
ReadStepMessages(ctx context.Context, stepName string) ([]exec.LLMMessage, error)
WriteStepMessages(ctx context.Context, stepName string, messages []exec.LLMMessage) error
WorkDir() string
Close(ctx context.Context) error
}
Attempt records and reads state for a single workflow execution attempt.
type BeginAttemptRequest ¶
type BeginAttemptRequest struct {
DAG *core.DAG
RunID string
AttemptID string
Retry bool
RootDAGRun exec.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 exec.DAGRunRef) (Attempt, error)
OpenChildAttempt(ctx context.Context, root exec.DAGRunRef, childRunID string) (Attempt, error)
}
Store opens execution state for workflow runs.
func NewHistoryStore ¶
func NewHistoryStore(store exec.DAGRunStore, opts ...historyStoreOption) Store
NewHistoryStore uses Dagu's run history store as the runtime run-state store.
Click to show internal directories.
Click to hide internal directories.