Stores
Stores are the fourth component type in walkerOS, alongside sources, transformers, and destinations. They provide passive key-value storage that other components consume — no event chains, no push functions.
The Store interface
Every store implements four operations:
Stores can be synchronous or asynchronous — the interface supports both.
Available implementations
| Package | Environment | Storage | Features |
|---|---|---|---|
@walkeros/store-memory | Any | In-memory | LRU eviction, TTL, namespace utility |
@walkeros/server-store-fs | Node.js | Filesystem | Read/write files, directory listing |
@walkeros/server-store-s3 | Node.js | S3-compatible | Object storage via AWS SDK |
Configuration
Bundled mode (flow.json)
Define stores in the stores section of a flow config:
Integrated mode (TypeScript)
Connecting stores to components
Use the $store: prefix in a component's env to inject a store instance at runtime:
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:
- Stores initialize first — before sources, transformers, and destinations
- 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.
Next steps
- Flow configuration - Stores in flow.json
- File transformer - Serve files from a store
- Cache transformer - Response caching with stores
- Docker — Including files - Bake store data into Docker images