pub enum WorkerMessage {
ActivityTask(Box<ProtoActivityTask>),
DrainRequest,
LivenessPing(ProtoLivenessPing),
CancelActivity(ProtoCancelActivity),
}Expand description
Message queued from server-side dispatch/shutdown into a worker stream writer.
Variants§
ActivityTask(Box<ProtoActivityTask>)
Activity invocation pushed to a worker.
DrainRequest
Graceful-shutdown notification; no new work will be dispatched.
LivenessPing(ProtoLivenessPing)
Transport liveness ping pushed by the liveness probe (#197).
It travels this channel — the SAME one dispatches travel — deliberately. The fact the probe needs is whether the server can reach this worker’s DISPATCH path, and a ping on a parallel channel could be answered by a process whose dispatch path is dead. Answered by the worker SDK RUNTIME, never by action code.
CancelActivity(ProtoCancelActivity)
Ask the worker to stop ONE in-flight activity (#233).
A request, not a guarantee: pushing this proves only that the server asked. Whether the work stops depends on the worker still holding the activity and on the action being interruptible, and neither is observable from here.
It travels this channel — the SAME one the dispatch travelled — so the cancel cannot overtake or bypass the task it interrupts, and so a worker whose dispatch path is dead cannot appear to have been told.
Trait Implementations§
Source§impl Clone for WorkerMessage
impl Clone for WorkerMessage
Source§fn clone(&self) -> WorkerMessage
fn clone(&self) -> WorkerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkerMessage
impl Debug for WorkerMessage
impl Eq for WorkerMessage
Source§impl PartialEq for WorkerMessage
impl PartialEq for WorkerMessage
impl StructuralPartialEq for WorkerMessage
Auto Trait Implementations§
impl Freeze for WorkerMessage
impl RefUnwindSafe for WorkerMessage
impl Send for WorkerMessage
impl Sync for WorkerMessage
impl Unpin for WorkerMessage
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
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>
T in a tonic::Request