MCPcopy
hub / github.com/coredns/coredns / NewRecorder

Function NewRecorder

plugin/pkg/dnstest/recorder.go:27–34  ·  view source on GitHub ↗

NewRecorder makes and returns a new Recorder, which captures the DNS rcode from the ResponseWriter and also the length of the response message written through it.

(w dns.ResponseWriter)

Source from the content-addressed store, hash-verified

25// which captures the DNS rcode from the ResponseWriter
26// and also the length of the response message written through it.
27func NewRecorder(w dns.ResponseWriter) *Recorder {
28 return &Recorder{
29 ResponseWriter: w,
30 Rcode: 0,
31 Msg: nil,
32 Start: time.Now(),
33 }
34}
35
36// WriteMsg records the status code and calls the
37// underlying ResponseWriter's WriteMsg method.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…