srvproxy

package module
v0.0.0-...-b3b45a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2015 License: MIT Imports: 9 Imported by: 0

README

srvproxy GoDoc Build Status

Proxy for DNS SRV records.

Usage

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExampleCustomUsage

func ExampleCustomUsage()

ExampleCustomUsage shows how to wire up a customized DNS SRV proxy into http.DefaultClient.

func ExampleDefaultUsage

func ExampleDefaultUsage()

ExampleDefaultUsage shows how to wire up a default DNS SRV proxy into http.DefaultClient.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL