First commit

This commit is contained in:
Miek Gieben
2016-03-18 20:57:35 +00:00
commit 3ec0d9fe6b
131 changed files with 15193 additions and 0 deletions

10
middleware/exchange.go Normal file
View File

@@ -0,0 +1,10 @@
package middleware
import "github.com/miekg/dns"
// Exchang sends message m to the server.
// TODO(miek): optionally it can do retries of other silly stuff.
func Exchange(c *dns.Client, m *dns.Msg, server string) (*dns.Msg, error) {
r, _, err := c.Exchange(m, server)
return r, err
}