Table of Contents

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

string

Methods

ConfigureReplayer(WorkflowReplayerOptions)

Configures the replayer options.

void ConfigureReplayer(WorkflowReplayerOptions options)

Parameters

options WorkflowReplayerOptions

The replayer options to configure.

ConfigureWorker(TemporalWorkerOptions)

Configures the worker options.

void ConfigureWorker(TemporalWorkerOptions options)

Parameters

options TemporalWorkerOptions

The 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

replayer WorkflowReplayer

The replayer to run.

continuation Func<WorkflowReplayer, IAsyncEnumerable<WorkflowReplayResult>>

The continuation function.

cancellationToken CancellationToken

Cancellation 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

replayer WorkflowReplayer

The replayer to run.

continuation Func<WorkflowReplayer, CancellationToken, Task<IEnumerable<WorkflowReplayResult>>>

The continuation function.

cancellationToken CancellationToken

Cancellation 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

worker TemporalWorker

The worker to run.

continuation Func<TemporalWorker, CancellationToken, Task<TResult>>

The continuation function.

stoppingToken CancellationToken

Cancellation token to stop the worker.

Returns

Task<TResult>

A task representing the asynchronous operation.

Type Parameters

TResult

Result type. For most worker run calls, this is ValueTuple.