协调器¶
通道间的协调器。
- ehforwarderbot.coordinator.mutex¶
全局交互线程锁。
- ehforwarderbot.coordinator.master¶
正在运行的主端对象。
- 类型
信道
- ehforwarderbot.coordinator.middlewares¶
中间件列表
- 类型
List[Middleware]
- ehforwarderbot.coordinator.add_middleware(middleware)[源代码]¶
向协调器注册一个中间件。
- 参数
middleware (Middleware) – 需要注册的中间件
- ehforwarderbot.coordinator.get_module_by_id(module_id)[源代码]¶
返回该组件 ID 对应的实例。
- ehforwarderbot.coordinator.master: ehforwarderbot.channel.MasterChannel¶
主端的实例。
- ehforwarderbot.coordinator.master_thread: Optional[threading.Thread] = None¶
运行主端 poll() 函数的线程。
- ehforwarderbot.coordinator.middlewares: List[ehforwarderbot.middleware.Middleware] = []¶
中间件实例,按执行顺序排序
- ehforwarderbot.coordinator.mutex: _thread.allocate_lock = <unlocked _thread.lock object>¶
CLI 界面中用户交互的独占锁
- ehforwarderbot.coordinator.slave_threads: Dict[ModuleID, threading.Thread] = {}¶
运行从端 poll() 函数的线程。键值为信道 ID。
- ehforwarderbot.coordinator.slaves: Dict[ModuleID, ehforwarderbot.channel.SlaveChannel] = {}¶
从端实例,键值为信道 ID。
- ehforwarderbot.coordinator.translator: gettext.NullTranslations = <gettext.NullTranslations object>¶
内部 GNU gettext 翻译器。