NewKeyFailoverTransport returns an http.RoundTripper backed by keyFailoverTransport. If config.Pool is nil, inner is returned unchanged.
(inner http.RoundTripper, config KeyFailoverConfig)
| 42 | // keyFailoverTransport. If config.Pool is nil, inner is returned |
| 43 | // unchanged. |
| 44 | func NewKeyFailoverTransport(inner http.RoundTripper, config KeyFailoverConfig) http.RoundTripper { |
| 45 | if config.Pool == nil { |
| 46 | return inner |
| 47 | } |
| 48 | return &keyFailoverTransport{ |
| 49 | inner: inner, |
| 50 | config: config, |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // RoundTrip is invoked by the proxy once per outer client request, |
| 55 | // after Rewrite has applied proxy headers. |
no outgoing calls