Sam Therapy
4c9221ee29
Some checks failed
continuous-integration/drone/push Build is failing
:^) Signed-off-by: Sam Therapy <sam@samtherapy.net>
25 lines
507 B
Go
25 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"`
|
|
}
|