memory

package
v0.0.0-...-83ab7ba Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) AppendHistory

func (s *Store) AppendHistory(ctx context.Context, executionID string, entryType string, payload map[string]any) error

func (*Store) CompleteTask

func (s *Store) CompleteTask(ctx context.Context, taskID string, result map[string]any) error

func (*Store) CreateExecution

func (s *Store) CreateExecution(ctx context.Context, execution *runtime.Execution) error

CreateExecution stores a new execution in memory. The in-memory store does not use context for cancellation; operations are instantaneous under a mutex.

func (*Store) Durability

func (*Store) Durability() runtime.StoreDurability

Durability reports that the in-memory store is process-local.

func (*Store) EnqueueTask

func (s *Store) EnqueueTask(ctx context.Context, task *runtime.ActivityTask) error

func (*Store) FailTask

func (s *Store) FailTask(ctx context.Context, taskID string, errorMessage string) error

func (*Store) FindTask

func (s *Store) FindTask(ctx context.Context, executionID string, ruleName string, activityName string, idempotencyKey string) (*runtime.ActivityTask, error)

func (*Store) GetExecution

func (s *Store) GetExecution(ctx context.Context, id string) (*runtime.Execution, error)

func (*Store) HeartbeatTask

func (s *Store) HeartbeatTask(ctx context.Context, taskID string, workerID string) error

func (*Store) ListHistory

func (s *Store) ListHistory(ctx context.Context, executionID string) ([]runtime.HistoryEntry, error)

func (*Store) ListTasks

func (s *Store) ListTasks(ctx context.Context, executionID string) ([]*runtime.ActivityTask, error)

func (*Store) NextTaskSeq

func (s *Store) NextTaskSeq(ctx context.Context, executionID string) (int, error)

func (*Store) PollTask

func (s *Store) PollTask(ctx context.Context, executionID string) (*runtime.ActivityTask, error)

func (*Store) PollTaskWithLease

func (s *Store) PollTaskWithLease(ctx context.Context, executionID string, workerID string, leaseTTL time.Duration) (*runtime.ActivityTask, error)

func (*Store) RecoverExpiredLeases

func (s *Store) RecoverExpiredLeases(ctx context.Context, executionID string, leaseTTL time.Duration) (int, error)

func (*Store) SaveExecution

func (s *Store) SaveExecution(ctx context.Context, execution *runtime.Execution) error

func (*Store) UpdateTask

func (s *Store) UpdateTask(ctx context.Context, task *runtime.ActivityTask) error

Jump to

Keyboard shortcuts

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