pub trait RemoteStorage: Sync {
    type Err: Send;
    type Context: Send + Sync;

    fn write<'life0, 'async_trait>(
        &'life0 self,
        ctx: Self::Context,
        req: WriteRequest
    ) -> Pin<Box<dyn Future<Output = StdResult<(), Self::Err>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn process_query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Self::Context,
        q: Query
    ) -> Pin<Box<dyn Future<Output = StdResult<QueryResult, Self::Err>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn read<'life0, 'async_trait>(
        &'life0 self,
        ctx: Self::Context,
        req: ReadRequest
    ) -> Pin<Box<dyn Future<Output = StdResult<ReadResponse, Self::Err>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
, { ... } }
Expand description

Remote storage is Prometheus’s solution for long-term storage.

Third-party storage can be integrated with Prometheus by implement this trait. https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations

Required Associated Types§

The type of failures yielded when write and read.

The type of request-scoped values provided for write and read.

Required Methods§

Write samples to remote storage.

Process one query within ReadRequest.

Note: Prometheus remote protocol sends multiple queries by default, use read to serve ReadRequest.

Provided Methods§

Read samples from remote storage.

ReadRequest may contain more than one sub queries.

Implementors§