|
15 | 15 | from mistapi.websockets.__ws_client import _MistWebsocket |
16 | 16 |
|
17 | 17 |
|
| 18 | +class PcapEvents(_MistWebsocket): |
| 19 | + """WebSocket stream for organization packet capture events.""" |
| 20 | + |
| 21 | + def __init__( |
| 22 | + self, |
| 23 | + mist_session: APISession, |
| 24 | + org_id: str, |
| 25 | + ping_interval: int = 60, |
| 26 | + ping_timeout: int | None = None, |
| 27 | + auto_reconnect: bool = False, |
| 28 | + max_reconnect_attempts: int = 5, |
| 29 | + reconnect_backoff: float = 2.0, |
| 30 | + max_reconnect_backoff: float | None = None, |
| 31 | + queue_maxsize: int = 0, |
| 32 | + subscription_watchdog_timeout: float = 10.0, |
| 33 | + rate_limit_backoff: float = 30.0, |
| 34 | + throughput_log_interval: int = 100, |
| 35 | + ) -> None: |
| 36 | + super().__init__( |
| 37 | + mist_session, |
| 38 | + channels=[f"/orgs/{org_id}/pcaps"], |
| 39 | + ping_interval=ping_interval, |
| 40 | + ping_timeout=ping_timeout, |
| 41 | + auto_reconnect=auto_reconnect, |
| 42 | + max_reconnect_attempts=max_reconnect_attempts, |
| 43 | + reconnect_backoff=reconnect_backoff, |
| 44 | + max_reconnect_backoff=max_reconnect_backoff, |
| 45 | + queue_maxsize=queue_maxsize, |
| 46 | + subscription_watchdog_timeout=subscription_watchdog_timeout, |
| 47 | + rate_limit_backoff=rate_limit_backoff, |
| 48 | + throughput_log_interval=throughput_log_interval, |
| 49 | + ) |
| 50 | + |
| 51 | + |
18 | 52 | class InsightsEvents(_MistWebsocket): |
19 | 53 | """WebSocket stream for organization insights events. |
20 | 54 |
|
|
0 commit comments