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)
| 25 | // which captures the DNS rcode from the ResponseWriter |
| 26 | // and also the length of the response message written through it. |
| 27 | func 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. |
no outgoing calls
searching dependent graphs…