9 lines
365 B
Python
9 lines
365 B
Python
class BaseRouter:
|
|
def post_message(self, namespace: bytes, topic: bytes, kind: bytes, body: bytes) -> None:
|
|
raise NotImplementedError
|
|
|
|
|
|
class StdOutRouter(BaseRouter):
|
|
def post_message(self, namespace: bytes, topic: bytes, kind: bytes, body: bytes) -> None:
|
|
print(f'{namespace.decode()}: {topic.decode()}: {kind.decode()}: {body.decode()}')
|