Skip to main content

Stores

Stores are the fourth component type in walkerOS, alongside sources, transformers, and destinations. They provide passive key-value storage that other components consume, with no event chains and no push functions.

The Store interface

Every store implements four operations:

Loading...

Stores can be synchronous or asynchronous. The interface supports both.

Available implementations

PackageEnvironmentStorageFeatures
@walkeros/server-store-fsNode.jsFilesystemRead/write files, directory listing
@walkeros/server-store-s3Node.jsS3-compatibleObject storage via AWS SDK
@walkeros/server-store-gcsNode.jsGoogle Cloud StorageObject storage via GCS JSON API
@walkeros/server-store-sheetsNode.jsGoogle SheetsRow-per-key storage via Sheets API

The collector ships a built-in in-memory cache tier (__cache). Wire it on any store via Flow.Store.cache instead of declaring a separate memory store.

Configuration

Bundled mode (flow.json)

Define stores in the stores section of a flow config. Use cache to enable the built-in in-memory cache tier on top of the backing store:

Loading...

Integrated mode (TypeScript)

Loading...

Connecting stores to components

Use the $store. prefix in a component's env to inject a store instance at runtime:

Loading...

The bundler resolves $store.cache to the initialized store instance. Invalid references (pointing to undefined stores) are caught at build time.

Lifecycle

Stores follow a strict lifecycle relative to other components:

  1. Stores initialize first: before sources, transformers, and destinations
  2. Stores destroy last: after all other components have shut down

This guarantees stores are available when any component starts and remain available while they gracefully shut down.

Setup lifecycle (optional)

Stores may also implement an optional setup() lifecycle for one-time, operator-time provisioning, for example creating SQLite tables or an S3 bucket. Setup runs only when an operator explicitly invokes walkeros setup store.<name>; the runtime never auto-invokes it. Opt in via config.setup in the flow config (true or an object).

See Setup lifecycle on the destinations page for the full concept, and walkeros setup CLI command for the operator-facing command.

Next steps

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)