cleanup client/selector/lookup (#1937)

* cleanup client/selector/lookup

* add mdns router, remove registry from client

* fix roundtripper

* remove comment

* fix compile issue

* fix mucp test

* fix api router
This commit is contained in:
Asim Aslam
2020-08-17 22:44:45 +01:00
committed by GitHub
parent 7135787b78
commit 50ec6c748f
17 changed files with 398 additions and 418 deletions

View File

@@ -21,18 +21,12 @@ func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
}
// rudimentary retry 3 times
for i := 0; i < 3; i++ {
route, err := r.st.Select(routes)
if err != nil {
continue
}
for _, route := range routes {
req.URL.Host = route.Address
w, err := r.rt.RoundTrip(req)
if err != nil {
continue
}
return w, nil
}