|
|
|
@ -6,7 +6,9 @@ import signal
|
|
|
|
|
from collections import UserList
|
|
|
|
|
from enum import Enum, auto
|
|
|
|
|
from typing import Callable, Coroutine, Dict, List, Optional
|
|
|
|
|
|
|
|
|
|
from loguru import logger
|
|
|
|
|
|
|
|
|
|
from busrtworker.boostrap import RpcBoot
|
|
|
|
|
from busrtworker.busrt import OP_PUBLISH, Client, Frame, Rpc, serialize
|
|
|
|
|
from busrtworker.kink import di
|
|
|
|
@ -35,6 +37,11 @@ class ConnectionInfo:
|
|
|
|
|
bus: Client = self.bus
|
|
|
|
|
await bus.send(topic, Frame(serialize(data) if decode else data, tp=OP_PUBLISH))
|
|
|
|
|
|
|
|
|
|
def client_name(self):
|
|
|
|
|
if not self.bus:
|
|
|
|
|
raise ValueError('must be init busrt client could call')
|
|
|
|
|
return self.bus.name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Router:
|
|
|
|
|
table: dict = {}
|
|
|
|
|