checkpoint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	StepNumber    int
	WorkflowInfo  WorkflowInfo
	RunnerData    RunnerStateData
	StateData     *hashmap.Map[workflow.ScopeKey, workflow.PortableValue]
	EdgeStateData map[string]workflow.PortableValue
	Parent        *workflow.CheckpointInfo
}

func (*Checkpoint) IsInitial

func (c *Checkpoint) IsInitial() bool

func (*Checkpoint) MarshalJSON

func (c *Checkpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for Checkpoint.

func (*Checkpoint) UnmarshalJSON

func (c *Checkpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler for Checkpoint.

type CheckpointingHandle

type CheckpointingHandle interface {
	IsCheckpointingEnabled() bool
	Checkpoints() []workflow.CheckpointInfo
	RestoreCheckpoint(context.Context, workflow.CheckpointInfo) error
}

type Manager

type Manager interface {
	Commit(ctx context.Context, sessionID string, checkpoint *Checkpoint) (workflow.CheckpointInfo, error)
	Lookup(ctx context.Context, sessionID string, checkpointInfo workflow.CheckpointInfo) (*Checkpoint, error)
	RetrieveIndex(ctx context.Context, sessionID string, withParent *workflow.CheckpointInfo) ([]workflow.CheckpointInfo, error)
}

type PortableMessageEnvelope

type PortableMessageEnvelope struct {
	MessageType  workflow.TypeID
	Message      workflow.PortableValue
	SourceID     string
	TargetID     string
	TraceContext map[string]string
}

type RunnerStateData

type RunnerStateData struct {
	InstantiatedExecutors map[string]struct{}
	QueuedMessages        map[string][]*PortableMessageEnvelope
	OutstandingRequests   []*workflow.ExternalRequest
	RequestOwners         map[string]string
	ResponsePortOwners    map[string]string
}

type SessionCache

type SessionCache[T any] struct {
	CheckpointIndex []workflow.CheckpointInfo
	Cache           map[workflow.CheckpointInfo]T
}

func (*SessionCache[T]) Add

func (c *SessionCache[T]) Add(sessionID string, value T) workflow.CheckpointInfo

func (*SessionCache[T]) AddCheckpointInfo

func (c *SessionCache[T]) AddCheckpointInfo(info workflow.CheckpointInfo, value T) bool

func (*SessionCache[T]) Get

func (c *SessionCache[T]) Get(info workflow.CheckpointInfo) (T, bool)

func (*SessionCache[T]) HasCheckpoints

func (c *SessionCache[T]) HasCheckpoints() bool

func (*SessionCache[T]) IsInIndex

func (c *SessionCache[T]) IsInIndex(info workflow.CheckpointInfo) bool

func (*SessionCache[T]) LastCheckpointInfo

func (c *SessionCache[T]) LastCheckpointInfo() (workflow.CheckpointInfo, bool)

type WorkflowInfo

type WorkflowInfo struct {
	Executors       map[string]executorInfo
	Edges           map[string][]workflow.EdgeInfo
	RequestPorts    map[string]workflow.RequestPortInfo
	StartExecutorID string
	OutputExecutors map[string][]workflow.OutputTag
}

func NewWorkflowInfo

func NewWorkflowInfo(wf *workflow.Workflow) WorkflowInfo

func (*WorkflowInfo) Match

func (w *WorkflowInfo) Match(wf *workflow.Workflow) bool

Jump to

Keyboard shortcuts

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