telega/flow/storage
Storage utilities for flow persistence.
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 persistent storage across restarts, implement a custom FlowStorage with a database backend.
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