pub struct StoreClient { /* private fields */ }Expand description
Typed Rust client for Store.
Implementations§
Source§impl StoreClient
impl StoreClient
Sourcepub fn builder() -> StoreClientBuilder
pub fn builder() -> StoreClientBuilder
Start building a client with per-service base URLs.
pub fn new(url: &str) -> Self
pub fn with_retry_config(url: &str, retry_config: RetryConfig) -> Self
Sourcepub fn with_split_urls(
health_base: &str,
ingest_base: &str,
query_base: &str,
compact_base: &str,
) -> Self
pub fn with_split_urls( health_base: &str, ingest_base: &str, query_base: &str, compact_base: &str, ) -> Self
Split endpoints for deployments where services run on different ports or hosts.
pub fn with_split_urls_and_retry( health_base: &str, ingest_base: &str, query_base: &str, compact_base: &str, retry_config: RetryConfig, ) -> Self
Sourcepub fn key_prefix(&self) -> Option<StoreKeyPrefix>
pub fn key_prefix(&self) -> Option<StoreKeyPrefix>
Return this client’s configured Store key prefix, if any.
Sourcepub fn with_key_prefix(&self, prefix: StoreKeyPrefix) -> Self
pub fn with_key_prefix(&self, prefix: StoreKeyPrefix) -> Self
Clone this client with a client-side Store key prefix.
Sourcepub fn without_key_prefix(&self) -> Self
pub fn without_key_prefix(&self) -> Self
Clone this client without client-side key prefixing.
Sourcepub fn encode_store_key(&self, key: &Key) -> Result<Key, ClientError>
pub fn encode_store_key(&self, key: &Key) -> Result<Key, ClientError>
Encode a logical key as it will appear in the physical Store.
Sourcepub fn decode_store_key(&self, key: &Key) -> Result<Key, ClientError>
pub fn decode_store_key(&self, key: &Key) -> Result<Key, ClientError>
Decode a physical Store key into this client’s logical keyspace.
Sourcepub fn connect_request_compression(&self) -> ConnectRequestCompression
pub fn connect_request_compression(&self) -> ConnectRequestCompression
Outgoing Connect request body compression (see ConnectRequestCompression).
pub fn decode_error_details( err: &ConnectError, ) -> Result<DecodedConnectError, DecodeError>
Sourcepub fn create_session(&self) -> SerializableReadSession
pub fn create_session(&self) -> SerializableReadSession
Create an unseeded serializable read session.
The first successful unary read fixes the session’s sequence floor from the server response. Streamed query reads fix that floor only once their trailers arrive.
Sourcepub fn create_session_with_sequence(
&self,
sequence: u64,
) -> SerializableReadSession
pub fn create_session_with_sequence( &self, sequence: u64, ) -> SerializableReadSession
Create a serializable read session pinned to at least sequence.
This is intended for stream-driven read paths that already observed a concrete store batch sequence and need follow-up query/proof reads to see at least that sequence.
pub async fn health(&self) -> Result<bool, ClientError>
pub async fn ready(&self) -> Result<bool, ClientError>
Trait Implementations§
Source§impl Clone for StoreClient
impl Clone for StoreClient
Source§fn clone(&self) -> StoreClient
fn clone(&self) -> StoreClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more