pub enum WorkerMessage {
ScheduleTimer {
timer: TimerSchedule,
},
ScheduleBatch {
timers: TimerBatch,
},
CancelTimer {
worker_id: u32,
timer_id: u64,
},
WorkerCountChanged {
new_worker_count: u16,
},
RebalancePartitions {
partition_start: usize,
partition_end: usize,
},
MigrateTasks {
task_handles: Vec<TaskHandle>,
},
ReportHealth,
GracefulShutdown,
Shutdown,
Noop,
}Expand description
Worker control-plane messages.
Variants§
ScheduleTimer
Fields
§
timer: TimerScheduleScheduleBatch
Fields
§
timers: TimerBatchCancelTimer
WorkerCountChanged
RebalancePartitions
Rebalance task partitions (reassign which leaves this worker processes)
MigrateTasks
Migrate specific tasks to another worker
Fields
§
task_handles: Vec<TaskHandle>ReportHealth
Request worker to report its current health metrics
GracefulShutdown
Graceful shutdown: finish current task then exit
Shutdown
Immediate shutdown
Noop
Trait Implementations§
Source§impl Clone for WorkerMessage
impl Clone for WorkerMessage
Source§fn clone(&self) -> WorkerMessage
fn clone(&self) -> WorkerMessage
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 moreSource§impl Debug for WorkerMessage
impl Debug for WorkerMessage
impl Send for WorkerMessage
impl Sync for WorkerMessage
Auto Trait Implementations§
impl Freeze for WorkerMessage
impl !RefUnwindSafe for WorkerMessage
impl Unpin for WorkerMessage
impl !UnwindSafe for WorkerMessage
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