pub struct RegistrationOptions { /* private fields */ }Expand description
What a registration says about the worker beyond where it is routed: the identity it registered under, its deployment instance, and the intervention capabilities its harness advertises.
Implementations§
Source§impl RegistrationOptions
impl RegistrationOptions
Sourcepub fn identified(identity: impl Into<String>, max_concurrency: u32) -> Self
pub fn identified(identity: impl Into<String>, max_concurrency: u32) -> Self
Options for a worker registering under identity and advertising
max_concurrency, with no deployment instance and the empty
(observability-only) capability set.
Capacity is a CONSTRUCTOR argument rather than a with_ setter because
there is no honest value to fall back to: a default would decide how
much work a process is handed on the strength of nobody having said, and
selection reads it on every dispatch. Every caller states it.
Zero is rejected by ConnectedWorkerRegistry::register_delivery, the
one funnel every transport and every façade passes through, so the check
has a single site and no caller can route around it.
Sourcepub fn identified_pending_capacity(identity: impl Into<String>) -> Self
pub fn identified_pending_capacity(identity: impl Into<String>) -> Self
Options for a worker that has registered over a transport whose registration frame cannot carry capacity, and will announce it in the next frame instead.
This is NOT a default and NOT an unbounded worker. It records that the
server does not yet know, which selection reads as “do not dispatch”
until ConnectedWorkerRegistry::set_advertised_capacity supplies the
worker’s own configured number. The only caller is the liminal
transport: liminal::protocol::WorkerRegistration is a published wire
type with six fields — namespaces, task queue, node, activity types,
identity, activities — and none of them is capacity, so a liminal worker
physically cannot state it in the frame that registers it.
Failing closed for that one round trip is deliberate. The alternative is to pick a number on the worker’s behalf, and every value is wrong: too low serializes a worker that fans, too high pushes it past its own admission — which is the defect this whole landing exists to remove.
Sourcepub fn with_instance(self, instance: Option<WorkerInstanceIdentity>) -> Self
pub fn with_instance(self, instance: Option<WorkerInstanceIdentity>) -> Self
The deployment instance the worker registered as, when it sent one.
Sourcepub fn with_intervention_capabilities(
self,
capabilities: InterventionCapabilities,
) -> Self
pub fn with_intervention_capabilities( self, capabilities: InterventionCapabilities, ) -> Self
The neutral InterventionCapabilities the worker’s harness advertises
(NOI-6). Metadata the intervention router gates on, never a routing
dimension.
Trait Implementations§
Source§impl Clone for RegistrationOptions
impl Clone for RegistrationOptions
Source§fn clone(&self) -> RegistrationOptions
fn clone(&self) -> RegistrationOptions
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 Freeze for RegistrationOptions
impl RefUnwindSafe for RegistrationOptions
impl Send for RegistrationOptions
impl Sync for RegistrationOptions
impl Unpin for RegistrationOptions
impl UnsafeUnpin for RegistrationOptions
impl UnwindSafe for RegistrationOptions
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