awl/util/query.go
Sam Therapy 4cf19ebf78
All checks were successful
continuous-integration/drone/push Build is passing
Another "minor refactor" (#61)
I need to make fewer of these :)
Reviewed-on: #61
2022-08-11 07:25:36 +00:00

26 lines
507 B
Go

// SPDX-License-Identifier: BSD-3-Clause
package util
import (
"time"
"github.com/miekg/dns"
)
// Response is the DNS response.
type Response struct {
DNS *dns.Msg // The full DNS response
RTT time.Duration `json:"rtt"` // The time it took to make the DNS query
}
// Request is a structure for a DNS query.
type Request struct {
Server string `json:"server"`
Name string `json:"name"`
Timeout time.Duration
Retries int
Type uint16 `json:"request"`
Class uint16 `json:"class"`
}