pub struct WorkerConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build_internal().
Implementations§
Source§impl<S: State> WorkerConfigBuilder<S>
impl<S: State> WorkerConfigBuilder<S>
Sourcepub fn namespace(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn namespace(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
Required.
The Temporal service namespace this worker is bound to
Sourcepub fn task_queue(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetTaskQueue<S>>where
S::TaskQueue: IsUnset,
pub fn task_queue(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetTaskQueue<S>>where
S::TaskQueue: IsUnset,
Required.
What task queue will this worker poll from? This task queue name will be used for both workflow and activity polling.
Sourcepub fn client_identity_override(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>where
S::ClientIdentityOverride: IsUnset,
pub fn client_identity_override(
self,
value: impl Into<String>,
) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>where
S::ClientIdentityOverride: IsUnset,
Sourcepub fn maybe_client_identity_override(
self,
value: Option<impl Into<String>>,
) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>where
S::ClientIdentityOverride: IsUnset,
pub fn maybe_client_identity_override(
self,
value: Option<impl Into<String>>,
) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>where
S::ClientIdentityOverride: IsUnset,
Sourcepub fn max_cached_workflows(
self,
value: usize,
) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>where
S::MaxCachedWorkflows: IsUnset,
pub fn max_cached_workflows(
self,
value: usize,
) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>where
S::MaxCachedWorkflows: IsUnset,
Optional (Some / Option setters). Default: 0.
If set nonzero, workflows will be cached and sticky task queues will be used, meaning that history updates are applied incrementally to suspended instances of workflow execution. Workflows are evicted according to a least-recently-used policy once the cache maximum is reached. Workflows may also be explicitly evicted at any time, or as a result of errors or failures.
Sourcepub fn maybe_max_cached_workflows(
self,
value: Option<usize>,
) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>where
S::MaxCachedWorkflows: IsUnset,
pub fn maybe_max_cached_workflows(
self,
value: Option<usize>,
) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>where
S::MaxCachedWorkflows: IsUnset,
Optional (Some / Option setters). Default: 0.
If set nonzero, workflows will be cached and sticky task queues will be used, meaning that history updates are applied incrementally to suspended instances of workflow execution. Workflows are evicted according to a least-recently-used policy once the cache maximum is reached. Workflows may also be explicitly evicted at any time, or as a result of errors or failures.
Sourcepub fn tuner(
self,
value: Arc<dyn WorkerTuner + Send + Sync>,
) -> WorkerConfigBuilder<SetTuner<S>>where
S::Tuner: IsUnset,
pub fn tuner(
self,
value: Arc<dyn WorkerTuner + Send + Sync>,
) -> WorkerConfigBuilder<SetTuner<S>>where
S::Tuner: IsUnset,
Optional (Some / Option setters).
Set a crate::WorkerTuner for this worker. Either this or at least one of the
max_outstanding_* fields must be set.
Sourcepub fn maybe_tuner(
self,
value: Option<Arc<dyn WorkerTuner + Send + Sync>>,
) -> WorkerConfigBuilder<SetTuner<S>>where
S::Tuner: IsUnset,
pub fn maybe_tuner(
self,
value: Option<Arc<dyn WorkerTuner + Send + Sync>>,
) -> WorkerConfigBuilder<SetTuner<S>>where
S::Tuner: IsUnset,
Optional (Some / Option setters).
Set a crate::WorkerTuner for this worker. Either this or at least one of the
max_outstanding_* fields must be set.
Sourcepub fn workflow_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>where
S::WorkflowTaskPollerBehavior: IsUnset,
pub fn workflow_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>where
S::WorkflowTaskPollerBehavior: IsUnset,
Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).
Maximum number of concurrent poll workflow task requests we will perform at a time on this
worker’s task queue. See also WorkerConfig::nonsticky_to_sticky_poll_ratio.
If using SimpleMaximum, Must be at least 2 when max_cached_workflows > 0, or is an error.
Sourcepub fn maybe_workflow_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>where
S::WorkflowTaskPollerBehavior: IsUnset,
pub fn maybe_workflow_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>where
S::WorkflowTaskPollerBehavior: IsUnset,
Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).
Maximum number of concurrent poll workflow task requests we will perform at a time on this
worker’s task queue. See also WorkerConfig::nonsticky_to_sticky_poll_ratio.
If using SimpleMaximum, Must be at least 2 when max_cached_workflows > 0, or is an error.
Sourcepub fn nonsticky_to_sticky_poll_ratio(
self,
value: f32,
) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>where
S::NonstickyToStickyPollRatio: IsUnset,
pub fn nonsticky_to_sticky_poll_ratio(
self,
value: f32,
) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>where
S::NonstickyToStickyPollRatio: IsUnset,
Optional (Some / Option setters). Default: 0.2.
Only applies when using PollerBehavior::SimpleMaximum
(max workflow task polls * this number) = the number of max pollers that will be allowed for the nonsticky queue when sticky tasks are enabled. If both defaults are used, the sticky queue will allow 4 max pollers while the nonsticky queue will allow one. The minimum for either poller is 1, so if the maximum allowed is 1 and sticky queues are enabled, there will be 2 concurrent polls.
Sourcepub fn maybe_nonsticky_to_sticky_poll_ratio(
self,
value: Option<f32>,
) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>where
S::NonstickyToStickyPollRatio: IsUnset,
pub fn maybe_nonsticky_to_sticky_poll_ratio(
self,
value: Option<f32>,
) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>where
S::NonstickyToStickyPollRatio: IsUnset,
Optional (Some / Option setters). Default: 0.2.
Only applies when using PollerBehavior::SimpleMaximum
(max workflow task polls * this number) = the number of max pollers that will be allowed for the nonsticky queue when sticky tasks are enabled. If both defaults are used, the sticky queue will allow 4 max pollers while the nonsticky queue will allow one. The minimum for either poller is 1, so if the maximum allowed is 1 and sticky queues are enabled, there will be 2 concurrent polls.
Sourcepub fn activity_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>where
S::ActivityTaskPollerBehavior: IsUnset,
pub fn activity_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>where
S::ActivityTaskPollerBehavior: IsUnset,
Sourcepub fn maybe_activity_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>where
S::ActivityTaskPollerBehavior: IsUnset,
pub fn maybe_activity_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>where
S::ActivityTaskPollerBehavior: IsUnset,
Sourcepub fn nexus_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>where
S::NexusTaskPollerBehavior: IsUnset,
pub fn nexus_task_poller_behavior(
self,
value: PollerBehavior,
) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>where
S::NexusTaskPollerBehavior: IsUnset,
Sourcepub fn maybe_nexus_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>where
S::NexusTaskPollerBehavior: IsUnset,
pub fn maybe_nexus_task_poller_behavior(
self,
value: Option<PollerBehavior>,
) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>where
S::NexusTaskPollerBehavior: IsUnset,
Sourcepub fn task_types(
self,
value: WorkerTaskTypes,
) -> WorkerConfigBuilder<SetTaskTypes<S>>where
S::TaskTypes: IsUnset,
pub fn task_types(
self,
value: WorkerTaskTypes,
) -> WorkerConfigBuilder<SetTaskTypes<S>>where
S::TaskTypes: IsUnset,
Required.
Specifies which task types this worker will poll for.
Note: At least one task type must be specified or the worker will fail validation.
Sourcepub fn sticky_queue_schedule_to_start_timeout(
self,
value: Duration,
) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>where
S::StickyQueueScheduleToStartTimeout: IsUnset,
pub fn sticky_queue_schedule_to_start_timeout(
self,
value: Duration,
) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>where
S::StickyQueueScheduleToStartTimeout: IsUnset,
Sourcepub fn maybe_sticky_queue_schedule_to_start_timeout(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>where
S::StickyQueueScheduleToStartTimeout: IsUnset,
pub fn maybe_sticky_queue_schedule_to_start_timeout(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>where
S::StickyQueueScheduleToStartTimeout: IsUnset,
Sourcepub fn max_heartbeat_throttle_interval(
self,
value: Duration,
) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>where
S::MaxHeartbeatThrottleInterval: IsUnset,
pub fn max_heartbeat_throttle_interval(
self,
value: Duration,
) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>where
S::MaxHeartbeatThrottleInterval: IsUnset,
Sourcepub fn maybe_max_heartbeat_throttle_interval(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>where
S::MaxHeartbeatThrottleInterval: IsUnset,
pub fn maybe_max_heartbeat_throttle_interval(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>where
S::MaxHeartbeatThrottleInterval: IsUnset,
Sourcepub fn default_heartbeat_throttle_interval(
self,
value: Duration,
) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>where
S::DefaultHeartbeatThrottleInterval: IsUnset,
pub fn default_heartbeat_throttle_interval(
self,
value: Duration,
) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>where
S::DefaultHeartbeatThrottleInterval: IsUnset,
Sourcepub fn maybe_default_heartbeat_throttle_interval(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>where
S::DefaultHeartbeatThrottleInterval: IsUnset,
pub fn maybe_default_heartbeat_throttle_interval(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>where
S::DefaultHeartbeatThrottleInterval: IsUnset,
Sourcepub fn max_task_queue_activities_per_second(
self,
value: f64,
) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>where
S::MaxTaskQueueActivitiesPerSecond: IsUnset,
pub fn max_task_queue_activities_per_second(
self,
value: f64,
) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>where
S::MaxTaskQueueActivitiesPerSecond: IsUnset,
Optional (Some / Option setters).
Sets the maximum number of activities per second the task queue will dispatch, controlled server-side. Note that this only takes effect upon an activity poll request. If multiple workers on the same queue have different values set, they will thrash with the last poller winning.
Setting this to a nonzero value will also disable eager activity execution.
Sourcepub fn maybe_max_task_queue_activities_per_second(
self,
value: Option<f64>,
) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>where
S::MaxTaskQueueActivitiesPerSecond: IsUnset,
pub fn maybe_max_task_queue_activities_per_second(
self,
value: Option<f64>,
) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>where
S::MaxTaskQueueActivitiesPerSecond: IsUnset,
Optional (Some / Option setters).
Sets the maximum number of activities per second the task queue will dispatch, controlled server-side. Note that this only takes effect upon an activity poll request. If multiple workers on the same queue have different values set, they will thrash with the last poller winning.
Setting this to a nonzero value will also disable eager activity execution.
Sourcepub fn max_worker_activities_per_second(
self,
value: f64,
) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>where
S::MaxWorkerActivitiesPerSecond: IsUnset,
pub fn max_worker_activities_per_second(
self,
value: f64,
) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>where
S::MaxWorkerActivitiesPerSecond: IsUnset,
Optional (Some / Option setters).
Limits the number of activities per second that this worker will process. The worker will not poll for new activities if by doing so it might receive and execute an activity which would cause it to exceed this limit. Negative, zero, or NaN values will cause building the options to fail.
Sourcepub fn maybe_max_worker_activities_per_second(
self,
value: Option<f64>,
) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>where
S::MaxWorkerActivitiesPerSecond: IsUnset,
pub fn maybe_max_worker_activities_per_second(
self,
value: Option<f64>,
) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>where
S::MaxWorkerActivitiesPerSecond: IsUnset,
Optional (Some / Option setters).
Limits the number of activities per second that this worker will process. The worker will not poll for new activities if by doing so it might receive and execute an activity which would cause it to exceed this limit. Negative, zero, or NaN values will cause building the options to fail.
Sourcepub fn ignore_evicts_on_shutdown(
self,
value: bool,
) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>where
S::IgnoreEvictsOnShutdown: IsUnset,
pub fn ignore_evicts_on_shutdown(
self,
value: bool,
) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>where
S::IgnoreEvictsOnShutdown: IsUnset,
Optional (Some / Option setters). Default: false.
If set false (default), shutdown will not finish until all pending evictions have been issued and replied to. If set true shutdown will be considered complete when the only remaining work is pending evictions.
This flag is useful during tests to avoid needing to deal with lots of uninteresting evictions during shutdown. Alternatively, if a lang implementation finds it easy to clean up during shutdown, setting this true saves some back-and-forth.
Sourcepub fn maybe_ignore_evicts_on_shutdown(
self,
value: Option<bool>,
) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>where
S::IgnoreEvictsOnShutdown: IsUnset,
pub fn maybe_ignore_evicts_on_shutdown(
self,
value: Option<bool>,
) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>where
S::IgnoreEvictsOnShutdown: IsUnset,
Optional (Some / Option setters). Default: false.
If set false (default), shutdown will not finish until all pending evictions have been issued and replied to. If set true shutdown will be considered complete when the only remaining work is pending evictions.
This flag is useful during tests to avoid needing to deal with lots of uninteresting evictions during shutdown. Alternatively, if a lang implementation finds it easy to clean up during shutdown, setting this true saves some back-and-forth.
Sourcepub fn fetching_concurrency(
self,
value: usize,
) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>where
S::FetchingConcurrency: IsUnset,
pub fn fetching_concurrency(
self,
value: usize,
) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>where
S::FetchingConcurrency: IsUnset,
Sourcepub fn maybe_fetching_concurrency(
self,
value: Option<usize>,
) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>where
S::FetchingConcurrency: IsUnset,
pub fn maybe_fetching_concurrency(
self,
value: Option<usize>,
) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>where
S::FetchingConcurrency: IsUnset,
Sourcepub fn graceful_shutdown_period(
self,
value: Duration,
) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>where
S::GracefulShutdownPeriod: IsUnset,
pub fn graceful_shutdown_period(
self,
value: Duration,
) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>where
S::GracefulShutdownPeriod: IsUnset,
Sourcepub fn maybe_graceful_shutdown_period(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>where
S::GracefulShutdownPeriod: IsUnset,
pub fn maybe_graceful_shutdown_period(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>where
S::GracefulShutdownPeriod: IsUnset,
Sourcepub fn local_timeout_buffer_for_activities(
self,
value: Duration,
) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>where
S::LocalTimeoutBufferForActivities: IsUnset,
pub fn local_timeout_buffer_for_activities(
self,
value: Duration,
) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>where
S::LocalTimeoutBufferForActivities: IsUnset,
Sourcepub fn maybe_local_timeout_buffer_for_activities(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>where
S::LocalTimeoutBufferForActivities: IsUnset,
pub fn maybe_local_timeout_buffer_for_activities(
self,
value: Option<Duration>,
) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>where
S::LocalTimeoutBufferForActivities: IsUnset,
Sourcepub fn workflow_failure_errors(
self,
value: HashSet<WorkflowErrorType>,
) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>where
S::WorkflowFailureErrors: IsUnset,
pub fn workflow_failure_errors(
self,
value: HashSet<WorkflowErrorType>,
) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>where
S::WorkflowFailureErrors: IsUnset,
Sourcepub fn maybe_workflow_failure_errors(
self,
value: Option<HashSet<WorkflowErrorType>>,
) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>where
S::WorkflowFailureErrors: IsUnset,
pub fn maybe_workflow_failure_errors(
self,
value: Option<HashSet<WorkflowErrorType>>,
) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>where
S::WorkflowFailureErrors: IsUnset,
Sourcepub fn workflow_types_to_failure_errors(
self,
value: HashMap<String, HashSet<WorkflowErrorType>>,
) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>where
S::WorkflowTypesToFailureErrors: IsUnset,
pub fn workflow_types_to_failure_errors(
self,
value: HashMap<String, HashSet<WorkflowErrorType>>,
) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>where
S::WorkflowTypesToFailureErrors: IsUnset,
Optional (Some / Option setters). Default: <HashMap<String, HashSet<WorkflowErrorType>> as Default>::default().
Like WorkerConfig::workflow_failure_errors, but specific to certain workflow types (the map key).
Sourcepub fn maybe_workflow_types_to_failure_errors(
self,
value: Option<HashMap<String, HashSet<WorkflowErrorType>>>,
) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>where
S::WorkflowTypesToFailureErrors: IsUnset,
pub fn maybe_workflow_types_to_failure_errors(
self,
value: Option<HashMap<String, HashSet<WorkflowErrorType>>>,
) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>where
S::WorkflowTypesToFailureErrors: IsUnset,
Optional (Some / Option setters). Default: <HashMap<String, HashSet<WorkflowErrorType>> as Default>::default().
Like WorkerConfig::workflow_failure_errors, but specific to certain workflow types (the map key).
Sourcepub fn max_outstanding_workflow_tasks(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>where
S::MaxOutstandingWorkflowTasks: IsUnset,
pub fn max_outstanding_workflow_tasks(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>where
S::MaxOutstandingWorkflowTasks: IsUnset,
Optional (Some / Option setters).
The maximum allowed number of workflow tasks that will ever be given to this worker at one
time. Note that one workflow task may require multiple activations - so the WFT counts as
“outstanding” until all activations it requires have been completed. Must be at least 2 if
max_cached_workflows is > 0, or is an error.
Mutually exclusive with tuner
Sourcepub fn maybe_max_outstanding_workflow_tasks(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>where
S::MaxOutstandingWorkflowTasks: IsUnset,
pub fn maybe_max_outstanding_workflow_tasks(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>where
S::MaxOutstandingWorkflowTasks: IsUnset,
Optional (Some / Option setters).
The maximum allowed number of workflow tasks that will ever be given to this worker at one
time. Note that one workflow task may require multiple activations - so the WFT counts as
“outstanding” until all activations it requires have been completed. Must be at least 2 if
max_cached_workflows is > 0, or is an error.
Mutually exclusive with tuner
Sourcepub fn max_outstanding_activities(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>where
S::MaxOutstandingActivities: IsUnset,
pub fn max_outstanding_activities(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>where
S::MaxOutstandingActivities: IsUnset,
Sourcepub fn maybe_max_outstanding_activities(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>where
S::MaxOutstandingActivities: IsUnset,
pub fn maybe_max_outstanding_activities(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>where
S::MaxOutstandingActivities: IsUnset,
Sourcepub fn max_outstanding_local_activities(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>where
S::MaxOutstandingLocalActivities: IsUnset,
pub fn max_outstanding_local_activities(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>where
S::MaxOutstandingLocalActivities: IsUnset,
Sourcepub fn maybe_max_outstanding_local_activities(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>where
S::MaxOutstandingLocalActivities: IsUnset,
pub fn maybe_max_outstanding_local_activities(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>where
S::MaxOutstandingLocalActivities: IsUnset,
Sourcepub fn max_outstanding_nexus_tasks(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>where
S::MaxOutstandingNexusTasks: IsUnset,
pub fn max_outstanding_nexus_tasks(
self,
value: impl Into<usize>,
) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>where
S::MaxOutstandingNexusTasks: IsUnset,
Sourcepub fn maybe_max_outstanding_nexus_tasks(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>where
S::MaxOutstandingNexusTasks: IsUnset,
pub fn maybe_max_outstanding_nexus_tasks(
self,
value: Option<impl Into<usize>>,
) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>where
S::MaxOutstandingNexusTasks: IsUnset,
Sourcepub fn versioning_strategy(
self,
value: WorkerVersioningStrategy,
) -> WorkerConfigBuilder<SetVersioningStrategy<S>>where
S::VersioningStrategy: IsUnset,
pub fn versioning_strategy(
self,
value: WorkerVersioningStrategy,
) -> WorkerConfigBuilder<SetVersioningStrategy<S>>where
S::VersioningStrategy: IsUnset,
Required.
A versioning strategy for this worker.
Sourcepub fn plugins(
self,
value: HashSet<PluginInfo>,
) -> WorkerConfigBuilder<SetPlugins<S>>where
S::Plugins: IsUnset,
pub fn plugins(
self,
value: HashSet<PluginInfo>,
) -> WorkerConfigBuilder<SetPlugins<S>>where
S::Plugins: IsUnset,
Sourcepub fn maybe_plugins(
self,
value: Option<HashSet<PluginInfo>>,
) -> WorkerConfigBuilder<SetPlugins<S>>where
S::Plugins: IsUnset,
pub fn maybe_plugins(
self,
value: Option<HashSet<PluginInfo>>,
) -> WorkerConfigBuilder<SetPlugins<S>>where
S::Plugins: IsUnset,
Sourcepub fn skip_client_worker_set_check(
self,
value: bool,
) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>where
S::SkipClientWorkerSetCheck: IsUnset,
pub fn skip_client_worker_set_check(
self,
value: bool,
) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>where
S::SkipClientWorkerSetCheck: IsUnset,
Sourcepub fn maybe_skip_client_worker_set_check(
self,
value: Option<bool>,
) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>where
S::SkipClientWorkerSetCheck: IsUnset,
pub fn maybe_skip_client_worker_set_check(
self,
value: Option<bool>,
) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>where
S::SkipClientWorkerSetCheck: IsUnset,
Sourcepub fn storage_drivers(
self,
value: HashSet<StorageDriverInfo>,
) -> WorkerConfigBuilder<SetStorageDrivers<S>>where
S::StorageDrivers: IsUnset,
pub fn storage_drivers(
self,
value: HashSet<StorageDriverInfo>,
) -> WorkerConfigBuilder<SetStorageDrivers<S>>where
S::StorageDrivers: IsUnset,
Sourcepub fn maybe_storage_drivers(
self,
value: Option<HashSet<StorageDriverInfo>>,
) -> WorkerConfigBuilder<SetStorageDrivers<S>>where
S::StorageDrivers: IsUnset,
pub fn maybe_storage_drivers(
self,
value: Option<HashSet<StorageDriverInfo>>,
) -> WorkerConfigBuilder<SetStorageDrivers<S>>where
S::StorageDrivers: IsUnset,
Source§impl<S: IsComplete> WorkerConfigBuilder<S>
impl<S: IsComplete> WorkerConfigBuilder<S>
Sourcepub fn build(self) -> Result<WorkerConfig, String>
pub fn build(self) -> Result<WorkerConfig, String>
Build and validate the worker configuration
Auto Trait Implementations§
impl<S> Freeze for WorkerConfigBuilder<S>
impl<S = Empty> !RefUnwindSafe for WorkerConfigBuilder<S>
impl<S> Send for WorkerConfigBuilder<S>
impl<S> Sync for WorkerConfigBuilder<S>
impl<S> Unpin for WorkerConfigBuilder<S>
impl<S> UnsafeUnpin for WorkerConfigBuilder<S>
impl<S = Empty> !UnwindSafe for WorkerConfigBuilder<S>
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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