replay

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package replay folds retained journal entries into settled orchestration projections. It never invokes application code or reconstructs live leases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

type Attempt struct {
	ID               uuid.UUID
	Ordinal          int
	StartedAt        time.Time
	FinishedAt       *time.Time
	Worker           string
	LeaseDurationMS  int64
	Classification   string
	ConsumedBudget   bool
	ConsumedAttempts int
	NextAttemptAt    *time.Time
	Failure          *failure.Value
}

type Command

type Command struct {
	ID                     uuid.UUID
	Key                    string
	Name                   string
	Version                int
	ParentCommandID        *uuid.UUID
	State                  string
	Args                   []byte
	DeclarationFingerprint [sha256.Size]byte
	Queue                  string
	RetryPolicy            []byte
	AttemptTimeoutMS       *int64
	RecoveryLeaseMS        *int64
	InitialDelayMS         *int64
	BudgetStartedAt        *time.Time
	NextAttemptAt          *time.Time
	Waits                  []journalcodec.EventWaitBody
	WithinMS               *int64
	CreatedPosition        int64
	TerminalPosition       *int64
	Result                 []byte
	Failure                *failure.Value
	Attempts               []Attempt
}

type Event

type Event struct {
	ID             uuid.UUID
	Position       int64
	Namespace      string
	Name           string
	Key            string
	Class          string
	TerminalStatus string
	CommandID      *uuid.UUID
	Body           []byte
}

type Run added in v0.3.0

type Run struct {
	Initialized       bool
	ID                uuid.UUID
	DefinitionName    string
	DefinitionVersion int
	RunKey            string
	Status            string
	MaxCommands       int
	CommandCount      int
	OpenCommands      int
	RootCommandID     *uuid.UUID
	LastPosition      int64
	Failure           *failure.Value
	CreatedAt         time.Time
	UpdatedAt         time.Time
	StatusAt          time.Time
	FinishedAt        *time.Time
	DeadlineAt        *time.Time
	Commands          map[uuid.UUID]Command
	Events            []Event
}

func Fold

func Fold(rows []store.JournalRow) (Run, error)

func New

func New() Run

func (*Run) Apply added in v0.3.0

func (state *Run) Apply(row store.JournalRow) error

Jump to

Keyboard shortcuts

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