feat(keep-alive): add keep-alive option

This commit is contained in:
2025-09-27 21:49:17 +01:00
parent ddb0d2ca4e
commit 2240d18f0b
13 changed files with 363 additions and 619 deletions

View File

@@ -12,6 +12,7 @@ type DNSMetric struct {
QueryType string `json:"query_type"`
Protocol string `json:"protocol"`
DNSSEC bool `json:"dnssec"`
KeepAlive bool `json:"keep_alive"`
DNSServer string `json:"dns_server"`
Timestamp time.Time `json:"timestamp"`
Duration int64 `json:"duration_ns"`
@@ -22,6 +23,7 @@ type DNSMetric struct {
Error string `json:"error,omitempty"`
}
// Rest stays exactly the same
type MetricsWriter struct {
encoder *json.Encoder
file *os.File