Skip to main content

spawn_connector

Function spawn_connector 

Source
pub fn spawn_connector(client: Client, cfg: ConnectorCfg) -> EventsHandle
Expand description

Spawn the connector task and return a EventsHandle for the axum side. The task owns the bezant::Client reference (cheap, it’s already Arc-wrapped internally) and runs until the binary exits.

If cfg.event_log is Some, also spawns a periodic prune task that trims the sqlite store to retention policy every cfg.prune_every.