Interface ITemporalWorkerPlugin
- Namespace
- Temporalio.Worker
- Assembly
- Temporalio.dll
Interface for temporal worker plugins.
public interface ITemporalWorkerPlugin
Remarks
WARNING: This API is experimental and may change in the future.
Properties
Name
Gets the plugin name.
string Name { get; }
Property Value
Methods
ConfigureReplayer(WorkflowReplayerOptions)
Configures the replayer options.
void ConfigureReplayer(WorkflowReplayerOptions options)
Parameters
optionsWorkflowReplayerOptionsThe replayer options to configure.
ConfigureWorker(TemporalWorkerOptions)
Configures the worker options.
void ConfigureWorker(TemporalWorkerOptions options)
Parameters
optionsTemporalWorkerOptionsThe worker options to configure.
ReplayWorkflowsAsync(WorkflowReplayer, Func<WorkflowReplayer, IAsyncEnumerable<WorkflowReplayResult>>, CancellationToken)
Runs the replayer asynchronously.
IAsyncEnumerable<WorkflowReplayResult> ReplayWorkflowsAsync(WorkflowReplayer replayer, Func<WorkflowReplayer, IAsyncEnumerable<WorkflowReplayResult>> continuation, CancellationToken cancellationToken)
Parameters
replayerWorkflowReplayerThe replayer to run.
continuationFunc<WorkflowReplayer, IAsyncEnumerable<WorkflowReplayResult>>The continuation function.
cancellationTokenCancellationTokenCancellation token to stop the replay.
Returns
- IAsyncEnumerable<WorkflowReplayResult>
A task representing the asynchronous operation.
ReplayWorkflowsAsync(WorkflowReplayer, Func<WorkflowReplayer, CancellationToken, Task<IEnumerable<WorkflowReplayResult>>>, CancellationToken)
Runs the replayer asynchronously.
Task<IEnumerable<WorkflowReplayResult>> ReplayWorkflowsAsync(WorkflowReplayer replayer, Func<WorkflowReplayer, CancellationToken, Task<IEnumerable<WorkflowReplayResult>>> continuation, CancellationToken cancellationToken)
Parameters
replayerWorkflowReplayerThe replayer to run.
continuationFunc<WorkflowReplayer, CancellationToken, Task<IEnumerable<WorkflowReplayResult>>>The continuation function.
cancellationTokenCancellationTokenCancellation token to stop the replay.
Returns
- Task<IEnumerable<WorkflowReplayResult>>
A task representing the asynchronous operation.
RunWorkerAsync<TResult>(TemporalWorker, Func<TemporalWorker, CancellationToken, Task<TResult>>, CancellationToken)
Runs the worker asynchronously.
Task<TResult> RunWorkerAsync<TResult>(TemporalWorker worker, Func<TemporalWorker, CancellationToken, Task<TResult>> continuation, CancellationToken stoppingToken)
Parameters
workerTemporalWorkerThe worker to run.
continuationFunc<TemporalWorker, CancellationToken, Task<TResult>>The continuation function.
stoppingTokenCancellationTokenCancellation token to stop the worker.
Returns
- Task<TResult>
A task representing the asynchronous operation.
Type Parameters
TResultResult type. For most worker run calls, this is ValueTuple.