Sam
4cf19ebf78
All checks were successful
continuous-integration/drone/push Build is passing
I need to make fewer of these :) Reviewed-on: #61
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"`
|
|
}
|