Skip to main content

Module stream

Module stream 

Source
Expand description

Supervision for long-lived streaming subscriptions.

SupervisedStream owns the reconnect, backoff, and shutdown loop that every consumer of a long-lived stream (a gRPC server-stream, a payment backend’s event stream) would otherwise hand-roll. It is transport-agnostic: the implementor supplies how to open a fresh stream and how to handle each item, holding its connection state as fields rather than cloning it into per-call closures.

Structs§

BackoffPolicy
Capped exponential backoff for SupervisedStream reconnect attempts.

Traits§

SupervisedStream
A supervised, self-reconnecting streaming subscription.