Projekt

Obecné

Profil

Stáhnout (589 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 91b91053 Martin Forejt
from recordclass import RecordClass
2
from typing import List
3
4
5
class ConnectionParams(RecordClass):
6 523382c1 MFori
    """
7
    Connection params to connect to broker
8
    """
9 91b91053 Martin Forejt
    host: str
10
    port: int
11
    timeout: int
12
13
14
class SubscriberParams(RecordClass):
15 523382c1 MFori
    """
16
    Params for Subscriber
17
    """
18 91b91053 Martin Forejt
    # list of topics to subscribe
19
    topics: List[str]
20
    # close limit in seconds
21
    closeLimit: int
22
    # connection params
23
    connection: ConnectionParams
24
    # connect anonymously to broker, otherwise provide username and password
25
    anonymous: bool
26
    username: str = ""
27
    password: str = ""