class documentation

class _RootPlugin(Plugin): (source)

View In Hierarchy

Undocumented

Method configure_replayer Hook called when creating a replayer to allow modification of configuration.
Method configure_worker Hook called when creating a worker to allow modification of configuration.
Method init_worker_plugin Initialize this plugin in the plugin chain.
Method run_replayer Hook called when running a replayer to allow interception of execution.
Async Method run_worker Hook called when running a worker to allow interception of execution.

Inherited from Plugin:

Method name Get the qualified name of this plugin. Can be overridden if desired to provide a more appropriate name.
def configure_replayer(self, config: ReplayerConfig) -> ReplayerConfig: (source)

Hook called when creating a replayer to allow modification of configuration.

This should be used to configure anything in ReplayerConfig needed to make execution match the worker and client config. This could include interceptors, DataConverter, workflows, and more.

Parameters
config:ReplayerConfigThe replayer configuration dictionary to potentially modify.
Returns
ReplayerConfigThe modified replayer configuration.
def configure_worker(self, config: WorkerConfig) -> WorkerConfig: (source)

Hook called when creating a worker to allow modification of configuration.

This method is called during worker creation and allows plugins to modify the worker configuration before the worker is fully initialized. Plugins can modify task queue names, adjust concurrency settings, add interceptors, or change other worker settings.

Parameters
config:WorkerConfigThe worker configuration dictionary to potentially modify.
Returns
WorkerConfigThe modified worker configuration.
def init_worker_plugin(self, next: Plugin): (source)

Initialize this plugin in the plugin chain.

This method sets up the chain of responsibility pattern by providing a reference to the next plugin in the chain. It is called during worker creation to build the plugin chain. Implementations should store this reference and call the corresponding method of the next plugin on method calls.

Parameters
next:PluginThe next plugin in the chain to delegate to.

Hook called when running a replayer to allow interception of execution.

async def run_worker(self, worker: Worker): (source)

Hook called when running a worker to allow interception of execution.

This method is called when the worker is started and allows plugins to intercept or wrap the worker execution. Plugins can add monitoring, custom lifecycle management, or other execution-time behavior.

Parameters
worker:WorkerThe worker instance to run.