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 | init |
Initialize this plugin in the plugin chain. |
Method | name |
Get the name of this plugin. Can be overridden if desired to provide a more appropriate name. |
Instance Variable | next |
Undocumented |
temporalio.client._RootPlugin
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. |
temporalio.service.ConnectConfig
) -> temporalio.service.ServiceClient
:
(source)
¶
temporalio.client._RootPlugin
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:temporalio.service.ConnectConfig | The service connection configuration. |
Returns | |
temporalio.service.ServiceClient | The connected service client. |
Initialize this plugin in the plugin chain.
This method sets up the chain of responsibility pattern by storing a reference
to the next plugin in the chain. It is called during client creation to build
the plugin chain. Note, this may be called twice in the case of connect
.
Parameters | |
next:Plugin | The next plugin in the chain to delegate to. |
Returns | |
Plugin | This plugin instance for method chaining. |
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). |