pub struct WorkerConfig {
pub namespaces: Vec<String>,
pub subject: String,
pub endpoint: String,
pub task_queue: String,
pub node: String,
pub identity: String,
pub max_concurrency: usize,
pub reconnect: ReconnectConfig,
pub transport_credentials: Option<TransportCredentials>,
}Expand description
Operator-supplied worker connection and serving configuration.
Tunable fields remain caller-supplied. Namespace authorization metadata
defaults to default/worker so development workers can register against
the default namespace without an explicit auth setup.
namespaces, task_queue, and node are disjoint routing dimensions.
namespaces is the SET of correctness/isolation boundaries the worker is
authorized for — the same set carried (comma-joined) in the
x-aion-namespaces auth metadata and in the registration scope, so a worker
registers into exactly the namespaces it is authorized for. task_queue is
the pool/flavour selector within each namespace. node is an OPTIONAL
locality affinity the worker advertises (default = machine hostname).
Fields§
§namespaces: Vec<String>Set of correctness/isolation boundaries this worker registers into.
Advertised both in x-aion-namespaces worker stream metadata (comma
joined) and as the registration namespace set, so authorization and
registration scope agree. Must be non-empty.
subject: StringSubject advertised in x-aion-subject worker stream metadata.
endpoint: StringEngine worker endpoint URI.
task_queue: StringPool/flavour selector within each namespace, sent as the registration’s
task_queue. The worker-pool address is (namespace, task_queue).
node: StringLocality affinity advertised at registration. Defaults to the machine hostname; a dispatch pinned to this node reaches this worker.
identity: StringWorker identity used by operators and future wire metadata.
max_concurrency: usizeMaximum concurrent activities this worker may serve.
reconnect: ReconnectConfigOperator-supplied reconnect settings.
transport_credentials: Option<TransportCredentials>Opaque credentials for the transport implementation.
Implementations§
Source§impl WorkerConfig
impl WorkerConfig
Sourcepub const fn builder() -> WorkerConfigBuilder
pub const fn builder() -> WorkerConfigBuilder
Starts an explicit builder. The caller must provide every required field
before calling WorkerConfigBuilder::build.
Trait Implementations§
Source§impl Clone for WorkerConfig
impl Clone for WorkerConfig
Source§fn clone(&self) -> WorkerConfig
fn clone(&self) -> WorkerConfig
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 WorkerConfig
impl Debug for WorkerConfig
impl Eq for WorkerConfig
Source§impl PartialEq for WorkerConfig
impl PartialEq for WorkerConfig
impl StructuralPartialEq for WorkerConfig
Auto 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
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§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<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>
T in a tonic::Request