pub trait IntegrityReader: Send + Sync {
// Required methods
fn get_integrity_query_results<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrityQueryResults> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_settlement_integrity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64, i64, Decimal)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_open_interest_by_underlying<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Decimal)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Aggregated integrity checks for the Hypercall persistence layer.
Used by:
GET /monitoring/integrity(admin endpoint, requires X-Admin-Key)MetricsCollectorslow-path (every 5 min, exports Prometheus gauges)
Each field in IntegrityQueryResults is an independent query result
so a single failing check doesn’t block the others.
Required Methods§
Sourcefn get_integrity_query_results<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrityQueryResults> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_integrity_query_results<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrityQueryResults> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run all 9 integrity checks on a single connection and return the aggregated results. This is the only method called in production.
Sourcefn get_settlement_integrity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64, i64, Decimal)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_settlement_integrity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64, i64, Decimal)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Settlement stats: (total, applied, pending, total_payout_value).
Test-only - production uses get_integrity_query_results.
Sourcefn get_open_interest_by_underlying<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Decimal)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_open_interest_by_underlying<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Decimal)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open interest grouped by underlying currency.
Test-only - production uses get_integrity_query_results.