pub struct WorkerConfig {
pub worker_id: String,
pub max_concurrent_tasks: usize,
pub memory_limit: u64,
pub num_cores: usize,
pub heartbeat_interval_secs: u64,
}Expand description
Worker node configuration.
Fields§
§worker_id: StringUnique worker identifier.
max_concurrent_tasks: usizeMaximum number of concurrent tasks.
memory_limit: u64Memory limit in bytes.
num_cores: usizeNumber of CPU cores available.
heartbeat_interval_secs: u64Heartbeat interval in seconds.
Implementations§
Source§impl WorkerConfig
impl WorkerConfig
Sourcepub fn with_max_concurrent_tasks(self, max: usize) -> Self
pub fn with_max_concurrent_tasks(self, max: usize) -> Self
Set the maximum number of concurrent tasks.
Sourcepub fn with_memory_limit(self, limit: u64) -> Self
pub fn with_memory_limit(self, limit: u64) -> Self
Set the memory limit.
Sourcepub fn with_num_cores(self, cores: usize) -> Self
pub fn with_num_cores(self, cores: usize) -> Self
Set the number of cores.
Trait Implementations§
Source§impl Clone for WorkerConfig
impl Clone for WorkerConfig
Source§fn clone(&self) -> WorkerConfig
fn clone(&self) -> WorkerConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 WorkerConfig
impl RefUnwindSafe for WorkerConfig
impl Send for WorkerConfig
impl Sync for WorkerConfig
impl Unpin for WorkerConfig
impl UnsafeUnpin for WorkerConfig
impl UnwindSafe for WorkerConfig
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