Documentation
¶
Index ¶
- func CheckResponse(response *dns.Msg) error
- func ClientConnection(client *dns.Client, dport int, host string) (*dns.Conn, error)
- func DNSClient(timeout time.Duration) *dns.Client
- func MakeReq(domain string, now func() time.Time, randomise bool, qtype dns.Type) *dns.Msg
- func MonitorTarget(sigPause chan struct{}, monPort int, monHost string)
- func ProcessQueryInputFile(path string) ([]string, []dns.Type, error)
- func QTypeStrToDNSQtype(qTypeStr string) (dns.Type, error)
- func RunQueries(dport int, host string, domains []string, timeout time.Duration, ...) error
- func RunQuery(reqMsg *dns.Msg, requestFunc SendMsg, now func() time.Time, state *RunState)
- type RunState
- type SendMsg
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse - very simple - just checks length of reply for now TODO pcullen make this better
func ClientConnection ¶
ClientConnection creates a persistent connection for an already existing dns client
func MonitorTarget ¶
MonitorTarget checks that target is responding
func ProcessQueryInputFile ¶
ProcessQueryInputFile parses a dnsperf compatible query input file for qnames/qtypes
func QTypeStrToDNSQtype ¶
QTypeStrToDNSQtype transforms qtypestr (eg: "A") to miekg/dns qtype eg: dns.TypeA
Types ¶
type RunState ¶
type RunState struct {
// contains filtered or unexported fields
}
RunState object holds the state of the performance test
func NewRunState ¶
func NewRunState(queriesToSend int, limiter ratelimit.Limiter, daemon bool, nowfunc func() time.Time) *RunState
NewRunState creates a new RunState instance
func (*RunState) ExportIntermediateResults ¶
func (r *RunState) ExportIntermediateResults() *stats.ExportedMetrics
ExportIntermediateResults is used to export intermediate results while the test is still in progress
func (*RunState) ExportResults ¶
func (r *RunState) ExportResults() *stats.ExportedMetrics
ExportResults returns the final results of the test
type ValidateResponse ¶
ValidateResponse returns error if DNS response not valid