Projekt

Obecné

Profil

Stáhnout (589 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
from recordclass import RecordClass
2
from typing import List
3

    
4

    
5
class ConnectionParams(RecordClass):
6
    """
7
    Connection params to connect to broker
8
    """
9
    host: str
10
    port: int
11
    timeout: int
12

    
13

    
14
class SubscriberParams(RecordClass):
15
    """
16
    Params for Subscriber
17
    """
18
    # 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 = ""
(6-6/6)