telega/flow/storage
Storage utilities for flow persistence.
FlowStorage is now derived from the unified telega/storage
KeyValueStorage contract. The ETS implementation lives in
telega/storage/ets; this module wires it into the flow contract.
Values
pub fn create_ets_storage() -> Result(
types.FlowStorage(error),
error.TelegaError,
)
Create ETS-backed storage for flow instances.
Data persists in memory for the lifetime of the VM but does NOT survive VM
restarts. For persistence across restarts, build a FlowStorage from a
database-backed KeyValueStorage via storage.flow_storage_from_storage.
pub fn create_noop_storage() -> types.FlowStorage(error)
Create no-op storage that discards all data. Useful for testing or stateless flows that don’t need persistence.
pub fn generate_id(
user_id: Int,
chat_id: Int,
flow_name: String,
) -> String
Generate a flow instance ID from user, chat, and flow name