Skip to main content

Module datastore

Module datastore 

Source
Expand description

Implements the platform-agnostic DataStore trait for Runtime.

This bridges the concrete SQLite-backed Runtime to the abstract trait used by the router crate, enabling the same routing logic to run on self-hosted servers and Cloudflare Workers alike.

Structs§

CacheAdapter
EmailAdapter
Picks an email backend based on environment variables. Falls back to ConsoleTransport (prints to stderr) when no provider is configured.
FileOpsAdapter
Adapter that exposes a FileStorage backend through the router’s [FileOps].
FnOpsImpl
Adapter that implements [FnOps] by delegating to a FnRunner.
PluginHooksAdapter
Adapter that routes router-level CRUD hook calls into the PluginRegistry.
PubSubAdapter
RuntimeOpenApiGenerator
ShardOpsAdapter
Wraps any Arc<dyn DynShardRegistry> so the router can dispatch shard routes without knowing the concrete SimState type.
TxStore
A DataStore that executes against a pre-held SQLite connection for the duration of a single mutation handler.
WsSseNotifier
Bridges WebSocket + SSE hubs to the router’s [ChangeNotifier] trait.

Functions§

find_functions_runtime
Spawn the Bun function runtime if a functions/ directory exists.
try_spawn_functions

Type Aliases§

LocalFileOps
Backwards-compatible alias; old code refers to this name.