pub struct WorkerManagerClient { /* private fields */ }Expand description
Client for WorkerManagerMasterClientService (Master:9200).
Used to discover the live worker list for block routing.
Implementations§
Source§impl WorkerManagerClient
impl WorkerManagerClient
Sourcepub async fn connect(config: &GoosefsConfig) -> Result<Self>
pub async fn connect(config: &GoosefsConfig) -> Result<Self>
Connect to the Goosefs Master for worker management.
In HA mode, discovers the Primary Master first via the inquire client.
Sourcepub async fn connect_with_inquire(
config: &GoosefsConfig,
inquire_client: Arc<dyn MasterInquireClient>,
) -> Result<Self>
pub async fn connect_with_inquire( config: &GoosefsConfig, inquire_client: Arc<dyn MasterInquireClient>, ) -> Result<Self>
Connect using an externally-provided MasterInquireClient.
This allows sharing the same inquire client with MasterClient,
avoiding redundant Primary discovery.
Sourcepub fn from_channel(channel: Channel) -> Self
pub fn from_channel(channel: Channel) -> Self
Create from an existing tonic channel.
Note: This bypasses authentication.
Sourcepub async fn get_worker_info_list(&self) -> Result<Vec<WorkerInfo>>
pub async fn get_worker_info_list(&self) -> Result<Vec<WorkerInfo>>
Fetch the full list of workers from the Master.
Trait Implementations§
Source§impl Clone for WorkerManagerClient
impl Clone for WorkerManagerClient
Source§fn clone(&self) -> WorkerManagerClient
fn clone(&self) -> WorkerManagerClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for WorkerManagerClient
impl !RefUnwindSafe for WorkerManagerClient
impl Send for WorkerManagerClient
impl Sync for WorkerManagerClient
impl Unpin for WorkerManagerClient
impl UnsafeUnpin for WorkerManagerClient
impl !UnwindSafe for WorkerManagerClient
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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