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.
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 plaintext Dex FlowService host:port used by the Worker.
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. The token uses Dex’s plaintext connection, so protect the network path.
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 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