mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2026-02-02 06:41:17 +01:00
This commit is a lot and adds breaking changes. Also adds a UDP subscriber and publisher.
21 lines
525 B
Python
21 lines
525 B
Python
from dataclasses import dataclass
|
|
|
|
from heisskleber.config import BaseConf
|
|
|
|
|
|
@dataclass
|
|
class ZmqConf(BaseConf):
|
|
protocol: str = "tcp"
|
|
interface: str = "127.0.0.1"
|
|
publisher_port: int = 5555
|
|
subscriber_port: int = 5556
|
|
packstyle: str = "json"
|
|
|
|
@property
|
|
def publisher_address(self) -> str:
|
|
return f"{self.protocol}://{self.interface}:{self.publisher_port}"
|
|
|
|
@property
|
|
def subscriber_address(self) -> str:
|
|
return f"{self.protocol}://{self.interface}:{self.subscriber_port}"
|