Skip to main content

init_query_data_source

Function init_query_data_source 

Source
pub(super) fn init_query_data_source<D>(
    ds: D,
    state: ApiState,
) -> (Box<dyn Metrics>, Arc<ExtensibleDataSource<D, ApiState>>)
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.