MCPcopy Index your code
hub / github.com/coder/coder / NewKeyFailoverTransport

Function NewKeyFailoverTransport

aibridge/keypool/failover.go:44–52  ·  view source on GitHub ↗

NewKeyFailoverTransport returns an http.RoundTripper backed by keyFailoverTransport. If config.Pool is nil, inner is returned unchanged.

(inner http.RoundTripper, config KeyFailoverConfig)

Source from the content-addressed store, hash-verified

42// keyFailoverTransport. If config.Pool is nil, inner is returned
43// unchanged.
44func 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.

Callers 2

newPassthroughRouterFunction · 0.92

Calls

no outgoing calls

Tested by 1