Coverage for nurin/models.py: 100%
18 statements
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-07 20:24 +0200
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-07 20:24 +0200
1from __future__ import annotations
3import dataclasses
6@dataclasses.dataclass(frozen=True)
7class Config:
8 down_actions: list[str] = ("echo down",)
9 down_check_interval: int = 5
10 down_count: int = 3
11 ping_targets: list[str] = ()
12 regular_check_interval: int = 30
13 reset_after_down_action: bool = False
14 sleep_jitter: float = 0.1
15 up_actions: list[str] = ("echo up",)
16 max_cycles: int | None = None
19@dataclasses.dataclass()
20class State:
21 down_check_counter: int = 0
22 up_actions_primed: bool = False
23 cycles: int = 0