Class: SimplePlugin
plugin.SimplePlugin
A unified plugin that implements multiple Temporal plugin interfaces. Provides a simple way to configure clients, workers, bundlers, and connections with consistent parameter resolution and merging strategies.
Plugins is an experimental feature; APIs may change without notice.
Hierarchy
-
SimplePlugin
Implements
Constructors
constructor
• new SimplePlugin(options): SimplePlugin
Creates a new SimplePlugin instance.
Parameters
| Name | Type | Description |
|---|---|---|
options | SimplePluginOptions | Configuration options for the plugin |
Returns
Properties
name
• Readonly name: string
The name of the plugin
Implementation of
Methods
configureBundler
▸ configureBundler(options): BundleOptions
Configures bundler options by merging plugin parameters with existing options.
Parameters
| Name | Type | Description |
|---|---|---|
options | BundleOptions | The existing bundle options |
Returns
Modified bundle options with plugin configuration applied
Implementation of
BundlerPlugin.configureBundler
configureClient
▸ configureClient(options): ClientOptions
Configures client options by merging plugin parameters with existing options.
Parameters
| Name | Type | Description |
|---|---|---|
options | ClientOptions | The existing client options |
Returns
Modified client options with plugin configuration applied
Implementation of
configureConnection
▸ configureConnection(options): ConnectionOptions
Configures connection options by merging plugin parameters with existing options. Special handling for function-based API keys.
Parameters
| Name | Type | Description |
|---|---|---|
options | ConnectionOptions | The existing connection options |
Returns
Modified connection options with plugin configuration applied
Implementation of
ConnectionPlugin.configureConnection
configureNativeConnection
▸ configureNativeConnection(options): NativeConnectionOptions
Configures native connection options by merging plugin parameters with existing options.
Parameters
| Name | Type | Description |
|---|---|---|
options | NativeConnectionOptions | The existing native connection options |
Returns
Modified native connection options with plugin configuration applied
Implementation of
NativeConnectionPlugin.configureNativeConnection
configureReplayWorker
▸ configureReplayWorker(options): ReplayWorkerOptions
Configures replay worker options by merging plugin parameters with existing options.
Parameters
| Name | Type | Description |
|---|---|---|
options | ReplayWorkerOptions | The existing replay worker options |
Returns
Modified replay worker options with plugin configuration applied
Implementation of
WorkerPlugin.configureReplayWorker
configureWorker
▸ configureWorker(options): WorkerOptions
Configures worker options by merging plugin parameters with existing options. Activities and nexus services are appended, while other options are replaced.
Parameters
| Name | Type | Description |
|---|---|---|
options | WorkerOptions | The existing worker options |
Returns
Modified worker options with plugin configuration applied
Implementation of
runWorker
▸ runWorker(worker, next): Promise<void>
Runs the worker, optionally wrapping execution in a custom context.
Parameters
| Name | Type | Description |
|---|---|---|
worker | Worker | The worker instance to run |
next | (w: Worker) => Promise<void> | Function to continue worker execution |
Returns
Promise<void>
Promise that resolves when worker execution completes