pub struct RemoteClient { /* private fields */ }Expand description
Read-only client wrapping a tonic-generated client. All methods translate
gRPC Status errors back into TimeSeriesError::ConnectionError so
callers don’t need to know whether the store is local or remote.
Implementations§
Source§impl RemoteClient
impl RemoteClient
pub async fn connect(addr: String) -> CoreResult<Self>
pub fn from_channel(channel: Channel) -> Self
pub async fn list_time_series( &self, owner_id: Option<i64>, owner_category: Option<OwnerCategory>, owner_type: Option<String>, time_series_type: Option<TimeSeriesType>, name: Option<String>, resolution: Option<Period>, interval: Option<Period>, features: Option<&Features>, ) -> CoreResult<Vec<TimeSeriesMetadata>>
pub async fn get_time_series( &self, key: &KeyIdentity, time_range: Option<(DateTime<Utc>, DateTime<Utc>)>, ) -> CoreResult<TimeSeriesData>
pub async fn get_time_series_keys( &self, owner_id: i64, owner_category: OwnerCategory, ) -> CoreResult<Vec<TimeSeriesKey>>
pub async fn get_resolutions( &self, time_series_type: Option<TimeSeriesType>, ) -> CoreResult<Vec<Period>>
pub async fn get_counts(&self) -> CoreResult<TimeSeriesCounts>
pub async fn get_forecast_parameters( &self, resolution: Option<Period>, interval: Option<Period>, ) -> CoreResult<ForecastParameters>
pub async fn has_time_series(&self, key: &KeyIdentity) -> CoreResult<bool>
pub async fn verify_integrity(&self) -> CoreResult<IntegrityReport>
Sourcepub async fn list_keys(
&self,
owner_id: Option<i64>,
owner_category: Option<OwnerCategory>,
owner_type: Option<String>,
time_series_type: Option<TimeSeriesType>,
name: Option<String>,
resolution: Option<Period>,
interval: Option<Period>,
features: Option<&Features>,
with_hash: bool,
) -> CoreResult<Vec<(TimeSeriesKey, Option<[u8; 32]>)>>
pub async fn list_keys( &self, owner_id: Option<i64>, owner_category: Option<OwnerCategory>, owner_type: Option<String>, time_series_type: Option<TimeSeriesType>, name: Option<String>, resolution: Option<Period>, interval: Option<Period>, features: Option<&Features>, with_hash: bool, ) -> CoreResult<Vec<(TimeSeriesKey, Option<[u8; 32]>)>>
List full keys matching the filter, each paired with the array content
hash when with_hash is set (None otherwise).
Sourcepub async fn get_metadata(
&self,
key: &KeyIdentity,
) -> CoreResult<TimeSeriesMetadata>
pub async fn get_metadata( &self, key: &KeyIdentity, ) -> CoreResult<TimeSeriesMetadata>
Full metadata record for a single key.
Sourcepub async fn bulk_read(
&self,
keys: &[&KeyIdentity],
time_range: Option<(DateTime<Utc>, DateTime<Utc>)>,
) -> CoreResult<Vec<TimeSeriesData>>
pub async fn bulk_read( &self, keys: &[&KeyIdentity], time_range: Option<(DateTime<Utc>, DateTime<Utc>)>, ) -> CoreResult<Vec<TimeSeriesData>>
Read several series at once, optionally time-sliced.
Sourcepub async fn time_series_counts_detailed(
&self,
) -> CoreResult<TimeSeriesCountsDetailed>
pub async fn time_series_counts_detailed( &self, ) -> CoreResult<TimeSeriesCountsDetailed>
Distinct owners per category and distinct arrays per kind.
Sourcepub async fn counts_by_type(&self) -> CoreResult<Vec<(TimeSeriesType, i64)>>
pub async fn counts_by_type(&self) -> CoreResult<Vec<(TimeSeriesType, i64)>>
Association count grouped by time series type.
Sourcepub async fn list_owner_ids(
&self,
category: OwnerCategory,
time_series_type: Option<TimeSeriesType>,
resolution: Option<Period>,
) -> CoreResult<Vec<i64>>
pub async fn list_owner_ids( &self, category: OwnerCategory, time_series_type: Option<TimeSeriesType>, resolution: Option<Period>, ) -> CoreResult<Vec<i64>>
Distinct owner ids of category with a time series, optionally scoped.
Sourcepub async fn get_intervals(
&self,
time_series_type: Option<TimeSeriesType>,
) -> CoreResult<Vec<Period>>
pub async fn get_intervals( &self, time_series_type: Option<TimeSeriesType>, ) -> CoreResult<Vec<Period>>
Distinct forecast intervals, optionally scoped to one type.
Sourcepub async fn static_summary(&self) -> CoreResult<Vec<StaticSummaryRow>>
pub async fn static_summary(&self) -> CoreResult<Vec<StaticSummaryRow>>
Grouped static-series summary.
Sourcepub async fn forecast_summary(&self) -> CoreResult<Vec<ForecastSummaryRow>>
pub async fn forecast_summary(&self) -> CoreResult<Vec<ForecastSummaryRow>>
Grouped forecast summary.
Sourcepub async fn check_static_consistency(
&self,
resolution: Option<Period>,
) -> CoreResult<Vec<StaticConsistency>>
pub async fn check_static_consistency( &self, resolution: Option<Period>, ) -> CoreResult<Vec<StaticConsistency>>
Per-resolution static-grid consistency rows (errors on divergence).
Sourcepub async fn resolve_forecast_key(
&self,
owner_id: i64,
owner_category: OwnerCategory,
name: &str,
resolution: Option<Period>,
interval: Option<Period>,
features: Features,
requested: RequestedType,
) -> CoreResult<TimeSeriesKey>
pub async fn resolve_forecast_key( &self, owner_id: i64, owner_category: OwnerCategory, name: &str, resolution: Option<Period>, interval: Option<Period>, features: Features, requested: RequestedType, ) -> CoreResult<TimeSeriesKey>
Resolve a forecast addressed by attributes plus a requested type.
Auto Trait Implementations§
impl !Freeze for RemoteClient
impl !RefUnwindSafe for RemoteClient
impl !UnwindSafe for RemoteClient
impl Send for RemoteClient
impl Sync for RemoteClient
impl Unpin for RemoteClient
impl UnsafeUnpin for RemoteClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request