pub struct RedisStoreClient {
name: String,
key_prefix: String,
fingerprint: String,
connect_timeout: Duration,
connect_budget: Duration,
client: Client,
conn: OnceCell<ConnectionManager>,
}Fields§
§name: String§key_prefix: String§fingerprint: String§connect_timeout: Duration§connect_budget: Duration§client: Client§conn: OnceCell<ConnectionManager>Implementations§
Source§impl RedisStoreClient
impl RedisStoreClient
Sourcepub fn build(cfg: &StoreConfig) -> Result<Self, String>
pub fn build(cfg: &StoreConfig) -> Result<Self, String>
Builds the client: resolves ${ENV} in url/password, parses the URL,
loads the CA bundle if configured. No network I/O — connection is
deferred to Self::conn, so config apply never blocks on a store.
Sourcepub fn fingerprint_of(cfg: &StoreConfig) -> String
pub fn fingerprint_of(cfg: &StoreConfig) -> String
Fingerprint over the resolved connection-relevant fields, so a changed env var (not just changed YAML) rebuilds the client on the next reload. Hashed so no secret sits in an easily-dumped string.
Sourcepub async fn conn(&self) -> Result<StoreConn, String>
pub async fn conn(&self) -> Result<StoreConn, String>
The shared multiplexed connection; established on first use and
auto-reconnecting thereafter. Every command on it is bounded by
connect_budget – see StoreConn.
Sourcepub async fn ping(&self) -> Result<PingInfo, String>
pub async fn ping(&self) -> Result<PingInfo, String>
PING + server version, for the Admin API connectivity check.
pub fn name(&self) -> &str
pub fn key_prefix(&self) -> &str
pub fn fingerprint(&self) -> &str
pub fn connect_timeout(&self) -> Duration
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RedisStoreClient
impl !RefUnwindSafe for RedisStoreClient
impl !UnwindSafe for RedisStoreClient
impl Send for RedisStoreClient
impl Sync for RedisStoreClient
impl Unpin for RedisStoreClient
impl UnsafeUnpin for RedisStoreClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more