Skip to main content

KeyedClient

Trait KeyedClient 

Source
pub trait KeyedClient: Client {
    // Required methods
    fn propose_keyed(
        &self,
        key: Vec<u8>,
        payload: Vec<u8>,
    ) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
    fn query_keyed(
        &self,
        key: Vec<u8>,
        payload: Vec<u8>,
    ) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send;
}
Expand description

Extension of Client for shard-aware multi-Raft routing (write-sharding-multi-raft).

Required Methods§

Source

fn propose_keyed( &self, key: Vec<u8>, payload: Vec<u8>, ) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send

Submit a write to the Raft group owning key.

Source

fn query_keyed( &self, key: Vec<u8>, payload: Vec<u8>, ) -> impl Future<Output = Result<Vec<u8>, ClientError>> + Send

Submit a linearizable read against the Raft group owning key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§