Coordinator¶
Coordinator among channels.
- ehforwarderbot.coordinator.mutex¶
Global interaction thread lock.
- Type
- ehforwarderbot.coordinator.slaves¶
Dictionary of running slave channel object. Keys are the unique identifier of the channel.
- Type
Dict[str, EFBChannel]
- ehforwarderbot.coordinator.middlewares¶
List of middlewares
- Type
List[Middleware]
- ehforwarderbot.coordinator.add_channel(channel)[source]¶
Register the channel with the coordinator.
- Parameters
channel (Channel) – Channel to register
- ehforwarderbot.coordinator.add_middleware(middleware)[source]¶
Register a middleware with the coordinator.
- Parameters
middleware (Middleware) – Middleware to register
- ehforwarderbot.coordinator.get_module_by_id(module_id)[source]¶
Return the module instance of a provided module ID
- ehforwarderbot.coordinator.master: ehforwarderbot.channel.MasterChannel¶
The instance of the master channel.
- ehforwarderbot.coordinator.master_thread: Optional[threading.Thread] = None¶
The thread running poll() of the master channel.
- ehforwarderbot.coordinator.middlewares: List[ehforwarderbot.middleware.Middleware] = []¶
Instances of middlewares. Sorted in the order of execution.
- ehforwarderbot.coordinator.mutex: _thread.allocate_lock = <unlocked _thread.lock object>¶
Mutual exclusive lock for user interaction through CLI interface
- ehforwarderbot.coordinator.send_message(msg)[source]¶
Deliver a new message or edited message to the destination channel.
- ehforwarderbot.coordinator.send_status(status)[source]¶
Deliver a status to the destination channel.
- Parameters
status (Status) – The status
- ehforwarderbot.coordinator.slave_threads: Dict[ModuleID, threading.Thread] = {}¶
Threads running poll() from slave channels. Keys are the channel IDs.
- ehforwarderbot.coordinator.slaves: Dict[ModuleID, ehforwarderbot.channel.SlaveChannel] = {}¶
Instances of slave channels. Keys are the channel IDs.
- ehforwarderbot.coordinator.translator: gettext.NullTranslations = <gettext.NullTranslations object>¶
Internal GNU gettext translator.