Skip to main content

TelemetryService

Type Alias TelemetryService 

Source
pub type TelemetryService = BoxCloneSyncService<TelemetryEvent, (), YetiError>;
Expand description

Tower-shaped telemetry-subscriber type.

The host owns the inbound mpsc::Receiver<TelemetryEvent> and drives a per-event call loop:

while let Some(ev) = rx.recv().await {
    if let Ok(svc) = service.ready().await {
        let _ = svc.call(ev).await; // drop errors
    }
 }

Replaces the legacy EventSubscriber::run(self, rx) contract — see this module’s docstring for the rationale. BoxCloneSyncService keeps the type Send + Sync + Clone so the host can spawn the drive loop on a dedicated task.

Aliased Type§

pub struct TelemetryService(/* private fields */);