Base class for client plugins that can intercept and modify client behavior.
Plugins allow customization of client creation and service connection processes through a chain of responsibility pattern. Each plugin can modify the client configuration or intercept service client connections.
If the plugin is also a temporalio.worker.Plugin, it will additionally be propagated as a worker plugin. You should likley not also provide it to the worker as that will result in the plugin being applied twice.
Method | configure |
Hook called when creating a client to allow modification of configuration. |
Async Method | connect |
Hook called when connecting to the Temporal service. |
Method | name |
Get the name of this plugin. Can be overridden if desired to provide a more appropriate name. |
temporalio.plugin.SimplePlugin
Hook called when creating a client to allow modification of configuration.
This method is called during client creation and allows plugins to modify the client configuration before the client is fully initialized. Plugins can add interceptors, modify connection parameters, or change other settings.
Parameters | |
config:ClientConfig | The client configuration dictionary to potentially modify. |
Returns | |
ClientConfig | The modified client configuration. |
async def connect_service_client(self, config:
ConnectConfig
, next: Callable[ [ ConnectConfig], Awaitable[ ServiceClient]]
) -> ServiceClient
:
(source)
¶
temporalio.plugin.SimplePlugin
Hook called when connecting to the Temporal service.
This method is called during service client connection and allows plugins to intercept or modify the connection process. Plugins can modify connection parameters, add authentication, or provide custom connection logic.
Parameters | |
config:ConnectConfig | The service connection configuration. |
next:Callable[ | Undocumented |
Returns | |
ServiceClient | The connected service client. |
temporalio.plugin.SimplePlugin
Get the name of this plugin. Can be overridden if desired to provide a more appropriate name.
Returns | |
str | The fully qualified name of the plugin class (module.classname). |