Skip to main content

RemoteClient

Struct RemoteClient 

Source
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

Source

pub async fn connect(addr: String) -> CoreResult<Self>

Source

pub fn from_channel(channel: Channel) -> Self

Source

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>>

Source

pub async fn get_time_series( &self, key: &KeyIdentity, time_range: Option<(DateTime<Utc>, DateTime<Utc>)>, ) -> CoreResult<TimeSeriesData>

Source

pub async fn get_time_series_keys( &self, owner_id: i64, owner_category: OwnerCategory, ) -> CoreResult<Vec<TimeSeriesKey>>

Source

pub async fn get_resolutions( &self, time_series_type: Option<TimeSeriesType>, ) -> CoreResult<Vec<Period>>

Source

pub async fn get_counts(&self) -> CoreResult<TimeSeriesCounts>

Source

pub async fn get_forecast_parameters( &self, resolution: Option<Period>, interval: Option<Period>, ) -> CoreResult<ForecastParameters>

Source

pub async fn has_time_series(&self, key: &KeyIdentity) -> CoreResult<bool>

Source

pub async fn verify_integrity(&self) -> CoreResult<IntegrityReport>

Source

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).

Source

pub async fn get_metadata( &self, key: &KeyIdentity, ) -> CoreResult<TimeSeriesMetadata>

Full metadata record for a single key.

Source

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.

Source

pub async fn time_series_counts_detailed( &self, ) -> CoreResult<TimeSeriesCountsDetailed>

Distinct owners per category and distinct arrays per kind.

Source

pub async fn counts_by_type(&self) -> CoreResult<Vec<(TimeSeriesType, i64)>>

Association count grouped by time series type.

Source

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.

Source

pub async fn get_intervals( &self, time_series_type: Option<TimeSeriesType>, ) -> CoreResult<Vec<Period>>

Distinct forecast intervals, optionally scoped to one type.

Source

pub async fn static_summary(&self) -> CoreResult<Vec<StaticSummaryRow>>

Grouped static-series summary.

Source

pub async fn forecast_summary(&self) -> CoreResult<Vec<ForecastSummaryRow>>

Grouped forecast summary.

Source

pub async fn check_static_consistency( &self, resolution: Option<Period>, ) -> CoreResult<Vec<StaticConsistency>>

Per-resolution static-grid consistency rows (errors on divergence).

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more