respodns/respodns/structs.py
Connor Olding f6e3a28aff add failures field to Check and sort by them
this commit removes the comments on individual checks.
these comments should be restored at a later point.
2020-09-04 15:39:08 +02:00

39 lines
982 B
Python

from collections import namedtuple
from dataclasses import dataclass
@dataclass
class Options:
execution: object = None
ipinfo: object = None
ip_simul: int = 15 # how many IPs to connect to at once
domain_simul: int = 3 # how many domains per IP to request at once
ip_wait: float = 0.05
domain_wait: float = 0.25
impatient: bool = False # reduce retries and times for timeouts
early_stopping: bool = True # stop at the first invalid domain
dry: bool = True # don't write anything to database
progress: bool = False # periodically print progress to stderr
blocking_file_io: bool = False # halt execution until inputs arrive
@dataclass
class Entry:
from datetime import datetime
date: datetime
success: bool
server: str
kind: str
domain: str
exception: str
addrs: list # list of strings
reason: str
execution: object
Check = namedtuple("Check", ("kind", "domain", "failures"))