#[non_exhaustive]pub struct WorkflowReplayerOptions {
pub namespace: String,
pub task_queue: String,
pub data_converter: DataConverter,
pub workflow_failure_errors: HashSet<WorkflowErrorType>,
pub workflow_types_to_failure_errors: HashMap<String, HashSet<WorkflowErrorType>>,
pub detect_nondeterministic_futures: bool,
pub patch_activation_callback: Option<PatchActivationCallback>,
/* private fields */
}Expand description
Options for constructing a workflow replayer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.namespace: StringNamespace exposed to workflow code during replay.
task_queue: StringTask queue exposed to workflow code during replay.
data_converter: DataConverterData converter used for workflow payloads.
workflow_failure_errors: HashSet<WorkflowErrorType>Worker-level workflow errors that should fail workflow executions.
workflow_types_to_failure_errors: HashMap<String, HashSet<WorkflowErrorType>>Per-workflow-type errors that should fail workflow executions.
detect_nondeterministic_futures: boolWhether to detect nondeterministic future usage in workflow code.
patch_activation_callback: Option<PatchActivationCallback>Callback controlling first non-replay patch decisions.
Implementations§
Source§impl WorkflowReplayerOptions
impl WorkflowReplayerOptions
Sourcepub fn new() -> WorkflowReplayerOptionsBuilder
pub fn new() -> WorkflowReplayerOptionsBuilder
Create an instance of WorkflowReplayerOptions using the builder syntax
Source§impl WorkflowReplayerOptions
impl WorkflowReplayerOptions
Sourcepub fn worker_interceptor<I: WorkerInterceptor + 'static>(
&mut self,
interceptor: I,
) -> &mut Self
pub fn worker_interceptor<I: WorkerInterceptor + 'static>( &mut self, interceptor: I, ) -> &mut Self
Append a worker interceptor used during replay.
Sourcepub fn workflow_interceptor(
&mut self,
constructor: WorkflowInterceptorConstructor,
) -> &mut Self
pub fn workflow_interceptor( &mut self, constructor: WorkflowInterceptorConstructor, ) -> &mut Self
Append a workflow interceptor constructor used during replay.
Sourcepub fn register_workflow<W>(
&mut self,
) -> Result<&mut Self, WorkflowRegistrationError>
pub fn register_workflow<W>( &mut self, ) -> Result<&mut Self, WorkflowRegistrationError>
Register a workflow implementation for replay.
Sourcepub fn register_workflow_with_factory<W, F>(
&mut self,
factory: F,
) -> Result<&mut Self, WorkflowRegistrationError>where
W: WorkflowImplementation,
<W::Run as WorkflowDefinition>::Input: Send,
F: Fn() -> W + Send + Sync + 'static,
pub fn register_workflow_with_factory<W, F>(
&mut self,
factory: F,
) -> Result<&mut Self, WorkflowRegistrationError>where
W: WorkflowImplementation,
<W::Run as WorkflowDefinition>::Input: Send,
F: Fn() -> W + Send + Sync + 'static,
Register a workflow using a custom instance factory.
Sourcepub fn register_workflow_interceptors(
&mut self,
constructors: Vec<WorkflowInterceptorConstructor>,
) -> &mut Self
pub fn register_workflow_interceptors( &mut self, constructors: Vec<WorkflowInterceptorConstructor>, ) -> &mut Self
Set the ordered constructors used to create workflow interceptors for each workflow instance.
This replaces any previously configured workflow interceptor constructors.
Sourcepub fn workflows(&self) -> WorkflowDefinitions
pub fn workflows(&self) -> WorkflowDefinitions
Returns all the registered workflows by cloning the current set.
Trait Implementations§
Source§impl Clone for WorkflowReplayerOptions
impl Clone for WorkflowReplayerOptions
Source§fn clone(&self) -> WorkflowReplayerOptions
fn clone(&self) -> WorkflowReplayerOptions
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 !RefUnwindSafe for WorkflowReplayerOptions
impl !UnwindSafe for WorkflowReplayerOptions
impl Freeze for WorkflowReplayerOptions
impl Send for WorkflowReplayerOptions
impl Sync for WorkflowReplayerOptions
impl Unpin for WorkflowReplayerOptions
impl UnsafeUnpin for WorkflowReplayerOptions
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> 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