pub struct ConnectionPool { /* private fields */ }Implementations§
Source§impl ConnectionPool
impl ConnectionPool
pub fn new() -> Self
pub fn with_tls(tls: ClientTlsConfig) -> Self
pub fn with_tls_and_auth(tls: ClientTlsConfig, token: String) -> Self
pub fn with_auth(token: String) -> Self
Wrap a value in a tonic::Request with the auth token attached (if configured).
pub async fn get_transport( self: &Arc<Self>, endpoint: &str, ) -> Result<GrainTransportClient<Channel>, ClusterError>
pub async fn get_membership( self: &Arc<Self>, endpoint: &str, ) -> Result<MembershipClient<Channel>, ClusterError>
pub async fn get_gateway( self: &Arc<Self>, endpoint: &str, ) -> Result<ClusterGatewayClient<Channel>, ClusterError>
Sourcepub fn remove(&self, endpoint: &str)
pub fn remove(&self, endpoint: &str)
Remove cached connections for an endpoint.
Called automatically when SWIM declares a member dead. Callers should also call this after persistent connection errors to force reconnection.
Note: tonic Channel handles reconnection internally for transient
failures — this method is for permanent removals (dead silos) or
forcing a fresh connection after repeated errors.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectionPool
impl !UnwindSafe for ConnectionPool
impl Freeze for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnsafeUnpin for ConnectionPool
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request