NewHTTPPool initializes an HTTP pool of peers, and registers itself as a PeerPicker. For convenience, it also registers itself as an http.Handler with http.DefaultServeMux. The self argument should be a valid base URL that points to the current server, for example "http://example.net:8000".
(self string)
| 78 | // The self argument should be a valid base URL that points to the current server, |
| 79 | // for example "http://example.net:8000". |
| 80 | func NewHTTPPool(self string) *HTTPPool { |
| 81 | p := NewHTTPPoolOpts(self, nil) |
| 82 | http.Handle(p.opts.BasePath, p) |
| 83 | return p |
| 84 | } |
| 85 | |
| 86 | var httpPoolMade bool |
| 87 |
searching dependent graphs…