pub enum WorkerDelivery {
Grpc(WorkerTaskSender),
Liminal(LiminalWorkerDelivery),
}Expand description
Transport through which the server delivers a dispatch to a registered worker.
A worker is selected the SAME way regardless of transport (select_worker
over the (namespace, task_queue, node) pool key); only the delivery leg
differs. The default gRPC path pushes a WorkerMessage onto the worker’s
stream mpsc (WorkerDelivery::Grpc); a liminal-connected worker is
delivered to by pushing the dispatch out on its existing liminal connection
(WorkerDelivery::Liminal, feature-gated). This enum is the minimal
transport-agnostic seam: the registry holds it on each WorkerHandle, and
the dispatch path reads the variant it needs. The gRPC variant carries exactly
the mpsc::Sender it always did, so the gRPC dispatch path is unchanged.
Variants§
Grpc(WorkerTaskSender)
gRPC stream delivery: the dispatch path pushes a WorkerMessage onto
this mpsc sender, exactly as before this enum existed.
Liminal(LiminalWorkerDelivery)
Liminal server-push delivery: the dispatch path pushes the serialized dispatch out on the worker’s existing liminal connection and awaits the correlated reply. Carries the connection identity needed to address that push.
Implementations§
Source§impl WorkerDelivery
impl WorkerDelivery
Sourcepub const fn transport(&self) -> WorkerTransport
pub const fn transport(&self) -> WorkerTransport
Which transport this delivery rides, stripped of the handle that addresses it.
The liveness probe needs to know a worker’s transport WITHOUT holding its connection handle, because the question it asks is not “how do I reach this worker” but “do I carry any wire on which this worker could be asked” (#25). Answering that from a cloned sender or a connection pid would tie a coverage decision to a live handle it does not need.
This is the ONE mapping from a held delivery to its wire discriminant.
Two byte-identical private copies of it existed — one here for the
cluster-event emitter, one in
cluster_stream for the snapshot — and
a third was nearly written for the liveness verdict. A discriminant table
kept in three places is three chances for a transport to be added to two
of them.
Trait Implementations§
Source§impl Clone for WorkerDelivery
impl Clone for WorkerDelivery
Source§fn clone(&self) -> WorkerDelivery
fn clone(&self) -> WorkerDelivery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WorkerDelivery
impl !UnwindSafe for WorkerDelivery
impl Freeze for WorkerDelivery
impl Send for WorkerDelivery
impl Sync for WorkerDelivery
impl Unpin for WorkerDelivery
impl UnsafeUnpin for WorkerDelivery
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<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