Skip to main content

init_query_data_source

Function init_query_data_source 

Source
fn init_query_data_source<N, P, D>(
    ds: D,
    state: ApiState<N, P>,
) -> (Box<dyn Metrics>, Arc<ExtensibleDataSource<D, ApiState<N, P>>>)
Expand description

Populate consensus metrics on ds, deposit its prometheus registry for the in-process telemetry push task (idempotent), and wrap it with the API state.

Returns the metrics handle plus the wrapped query data source shared by the axum server and update loops.