pub struct ClusterClient {
pub receptionist: Arc<ClusterReceptionist>,
/* private fields */
}Fields§
§receptionist: Arc<ClusterReceptionist>Implementations§
Source§impl ClusterClient
impl ClusterClient
pub fn new(receptionist: Arc<ClusterReceptionist>) -> Self
pub fn with_settings( receptionist: Arc<ClusterReceptionist>, settings: ClusterClientSettings, ) -> Self
Sourcepub fn send(&self, name: &str) -> Option<UntypedActorRef>
pub fn send(&self, name: &str) -> Option<UntypedActorRef>
Direct receptionist lookup (in-process / single-node case).
Sourcepub fn next_contact(&self) -> Option<String>
pub fn next_contact(&self) -> Option<String>
Pick the next initial contact (round-robin). Returns None
if initial_contacts is empty.
Sourcepub async fn establish<F>(
&self,
try_resolve: F,
) -> Result<UntypedActorRef, ClusterClientError>
pub async fn establish<F>( &self, try_resolve: F, ) -> Result<UntypedActorRef, ClusterClientError>
establish — drive contact-point discovery using try_resolve
until it returns Some(_) or max_attempts is exhausted.
Sleeps establishing_get_contacts_interval between attempts.
Auto Trait Implementations§
impl !Freeze for ClusterClient
impl !RefUnwindSafe for ClusterClient
impl Send for ClusterClient
impl Sync for ClusterClient
impl Unpin for ClusterClient
impl UnsafeUnpin for ClusterClient
impl !UnwindSafe for ClusterClient
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