MessageConstructor creates DNS messages.
| 10 | |
| 11 | // MessageConstructor creates DNS messages. |
| 12 | type MessageConstructor interface { |
| 13 | // NewMsgNXDOMAIN creates a new response message replying to req with the |
| 14 | // NXDOMAIN code. |
| 15 | NewMsgNXDOMAIN(req *dns.Msg) (resp *dns.Msg) |
| 16 | |
| 17 | // NewMsgSERVFAIL creates a new response message replying to req with the |
| 18 | // SERVFAIL code. |
| 19 | NewMsgSERVFAIL(req *dns.Msg) (resp *dns.Msg) |
| 20 | |
| 21 | // NewMsgNOTIMPLEMENTED creates a new response message replying to req with |
| 22 | // the NOTIMPLEMENTED code. |
| 23 | NewMsgNOTIMPLEMENTED(req *dns.Msg) (resp *dns.Msg) |
| 24 | |
| 25 | // NewMsgNODATA creates a new empty response message replying to req with |
| 26 | // the NOERROR code. |
| 27 | // |
| 28 | // See https://www.rfc-editor.org/rfc/rfc2308#section-2.2. |
| 29 | NewMsgNODATA(req *dns.Msg) (resp *dns.Msg) |
| 30 | } |
| 31 | |
| 32 | // DefaultMessageConstructor is a default implementation of |
| 33 | // [MessageConstructor]. |
no outgoing calls
no test coverage detected
searching dependent graphs…