crossbar.worker.controller¶
Classes¶
A native Crossbar.io worker process. The worker will be connected |
Module Contents¶
- class WorkerController(config=None, reactor=None, personality=None)[source]¶
Bases:
crossbar.common.process.NativeProcessA native Crossbar.io worker process. The worker will be connected to the node’s management router running inside the node controller via WAMP-over-stdio.
- add_pythonpath(paths, prepend=True, details=None)[source]¶
Add paths to Python module search paths.
This procedure is registered under WAMP URI
crossbar.worker.<worker_id>.add_pythonpath.
- get_controller_session() crossbar.interfaces.ISession[source]¶
Implements :method:`crossbar.interfaces.IRealmContainer.get_controller_session`.
- get_profile(profile_id, details=None)[source]¶
Get a profile previously produced by a profiler run.
This procedure is registered under WAMP URI
crossbar.worker.<worker_id>.get_profile.When no profile with given ID exists, a WAMP error
crossbar.error.no_such_objectis raised.
- get_profilers(details=None)[source]¶
Registered under:
crossbar.worker.<worker_id>.get_profilersReturns available profilers.
- Parameters:
details (
autobahn.wamp.types.CallDetails) – WAMP call details (auto-filled by WAMP).- Returns:
A list of profilers.
- Return type:
- get_public_key()[source]¶
Call into node controller (over secure controller-worker pipe) to get the node’s public key.
- Returns:
- get_pythonpath(details=None)[source]¶
Returns the current Python module search paths.
This procedure is registered under WAMP URI
crossbar.worker.<worker_id>.get_pythonpath.
- onJoin(details, publish_ready=True)[source]¶
Called when worker process has joined the node management realm.
- onLeave(details)[source]¶
Implements
autobahn.wamp.interfaces.ISession.onLeave()
- shutdown(details=None)[source]¶
Registered under:
crossbar.worker.<worker_id>.shutdownEvent published under:crossbar.worker.<worker_id>.on_shutdown_requested
- sign_challenge(challenge: autobahn.wamp.types.Challenge, channel_id: bytes | None, channel_id_type=Optional[str])[source]¶
Call into node controller (over secure controller-worker pipe) to sign challenge with node key.
- Parameters:
challenge
channel_id
channel_id_type
- Returns:
- start_profiler(profiler='vmprof', runtime=10, start_async=True, details=None)[source]¶
Registered under:
crossbar.worker.<worker_id>.start_profilerStart a profiler producing a profile which is stored and can be queried later.
- Parameters:
profiler (str) – The profiler to start, e.g.
vmprof.runtime (float) – Profiling duration in seconds.
start_async (bool) – Flag to turn on/off asynchronous mode.
details (
autobahn.wamp.types.CallDetails) – WAMP call details (auto-filled by WAMP).
- Returns:
If running in synchronous mode, the profiling result. Else a profile ID is returned which later can be used to retrieve the profile.
- Return type: