memory library
Optional in-memory adapters for local development and tests.
Production applications should import a concrete adapter package instead.
This library is intentionally separate from the primary stem.dart API so
adapter usage is explicit in new code.
Classes
- InMemoryBroker
- In-memory broker for testing and local development.
- InMemoryEventBus
- No-op EventBus suitable for single-process tests.
- InMemoryLockStore
- In-memory lock store used for tests and local scheduling.
- InMemoryResultBackend
- Simple in-memory result backend used for tests and local development.
- InMemoryRevokeStore
- Simple in-memory implementation of RevokeStore useful for tests.
- InMemoryScheduleStore
- Simple in-memory schedule store implementation used in tests.
- InMemoryWorkflowStore
- Simple in-memory WorkflowStore used for tests and examples.
Functions
-
memoryBrokerFactory(
{String namespace = 'stem', Duration defaultVisibilityTimeout = const Duration(seconds: 30)}) → StemBrokerFactory - Creates a StemBrokerFactory backed by InMemoryBroker.
-
memoryEventBusFactory(
) → WorkflowEventBusFactory - Creates a WorkflowEventBusFactory backed by InMemoryEventBus.
-
memoryLockStoreFactory(
) → LockStoreFactory - Creates a LockStoreFactory backed by InMemoryLockStore.
-
memoryResultBackendFactory(
{Duration defaultTtl = const Duration(days: 1), Duration groupDefaultTtl = const Duration(days: 1), Duration heartbeatTtl = const Duration(minutes: 1)}) → StemBackendFactory - Creates a StemBackendFactory backed by InMemoryResultBackend.
-
memoryRevokeStoreFactory(
) → RevokeStoreFactory - Creates a RevokeStoreFactory backed by InMemoryRevokeStore.
-
memoryScheduleStoreFactory(
{ScheduleCalculator? calculator}) → ScheduleStoreFactory - Creates a ScheduleStoreFactory backed by InMemoryScheduleStore.
-
memoryWorkflowStoreFactory(
{WorkflowClock clock = const SystemWorkflowClock()}) → WorkflowStoreFactory - Creates a WorkflowStoreFactory backed by InMemoryWorkflowStore.