pub struct WorkerOptions { /* private fields */ }Expand description
Configures a pull crate::Worker and its outbound Dex connection.
Defaults connect to Dex at 127.0.0.1:8801, use PullWorkerOptions::default, and allow
two minutes for Attribute-index synchronization. Workers need only an outbound connection.
Changed in 1.25.0: every Worker uses pull mode; no listener or Worker target is configured.
Implementations§
Source§impl WorkerOptions
impl WorkerOptions
Sourcepub fn server_address(self, value: impl Into<String>) -> Self
pub fn server_address(self, value: impl Into<String>) -> Self
Sets the Dex FlowService address used by the Worker.
With TLS, accepts host:port, dns:///host:port, or dns://authority/host:port.
Sourcepub fn flow_service_tls(self, value: FlowServiceTlsOptions) -> Self
pub fn flow_service_tls(self, value: FlowServiceTlsOptions) -> Self
Enables TLS for every outbound Worker FlowService connection.
Omitted by default, preserving plaintext gRPC. Takes ownership of value and returns
these options with TLS enabled. crate::Worker::try_new validates the address,
additional roots, and server name, returning crate::SdkError::InvalidArgument for
invalid input. See FlowServiceTlsOptions for defaults and a complete example.
Sourcepub fn credential(self, value: Arc<dyn Credential>) -> Self
pub fn credential(self, value: Arc<dyn Credential>) -> Self
Sends a bearer token on FlowService calls and pull Worker task streams.
The default sends no authorization metadata. The credential may be called concurrently;
errors fail calls locally. Pull streams evaluate it at opening and again on reconnect.
Enable Self::flow_service_tls to protect the token on the network.
Sourcepub fn pull(self, value: PullWorkerOptions) -> Self
pub fn pull(self, value: PullWorkerOptions) -> Self
Configures pull capacity, queue registration, and graceful shutdown.
Every Worker uses pull; this builder overrides PullWorkerOptions::default.
Takes ownership of value and returns these Worker options with its settings applied.
crate::Worker::try_new validates capacity, identity, and timeout settings.
See PullWorkerOptions for defaults and a complete Worker and Client example.
Sourcepub fn attribute_index_sync_timeout(self, value: Duration) -> Self
pub fn attribute_index_sync_timeout(self, value: Duration) -> Self
Sets the startup Indexed Attribute synchronization deadline.
The default is two minutes. Worker::try_new
rejects Duration::ZERO.
Trait Implementations§
Source§impl Clone for WorkerOptions
impl Clone for WorkerOptions
Source§impl Debug for WorkerOptions
impl Debug for WorkerOptions
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerOptions
impl !UnwindSafe for WorkerOptions
impl Forget for WorkerOptions
impl Freeze for WorkerOptions
impl Send for WorkerOptions
impl Sync for WorkerOptions
impl Unpin for WorkerOptions
impl UnsafeUnpin for WorkerOptions
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<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