Proxy for DNS SRV records.
var rt http.RoundTripper
rt = http.DefaultTransport
rt = proxy.Proxy(proxy.Next(rt))
rt = retry.Retry(retry.Next(rt))
t := &http.Transport{}
t.RegisterProtocol("dnssrv", rt)
http.DefaultClient.Transport = t
resp, err := http.Get("dnssrv://foo.bar.srv.internal.name/normal/path?key=value")
if err != nil {
log.Fatal(err)
}
io.Copy(os.Stdout, resp.Body)
resp.Body.Close()
For more examples, see examples.go.