etcdmain, tcpproxy: srv-priority policy

Adds DNS SRV weighting and priorities to gateway.

Partially addresses #4378
This commit is contained in:
Anthony Romano
2017-05-04 21:57:54 -07:00
parent 07ad18178d
commit c232814003
5 changed files with 116 additions and 41 deletions

View File

@ -42,9 +42,11 @@ func TestUserspaceProxy(t *testing.T) {
t.Fatal(err)
}
var port uint16
fmt.Sscanf(u.Port(), "%d", &port)
p := TCPProxy{
Listener: l,
Endpoints: []string{u.Host},
Endpoints: []*net.SRV{{Target: u.Hostname(), Port: port}},
}
go p.Run()
defer p.Stop()