MCPcopy Index your code
hub / github.com/ContentSquare/chproxy / getProxy

Function getProxy

proxy_test.go:1164–1179  ·  view source on GitHub ↗
(c *config.Config)

Source from the content-addressed store, hash-verified

1162}
1163
1164func getProxy(c *config.Config) (*reverseProxy, error) {
1165 addr, err := url.Parse(fakeServer.URL)
1166 if err != nil {
1167 return nil, err
1168 }
1169 cfg := *c
1170 cfg.Clusters = make([]config.Cluster, len(c.Clusters))
1171 copy(cfg.Clusters, c.Clusters)
1172 cfg.Clusters[0].Nodes = []string{addr.Host}
1173 proxy, err := newConfiguredProxy(&cfg)
1174 if err != nil {
1175 return nil, err
1176 }
1177
1178 return proxy, nil
1179}
1180
1181func newConfig() *config.Config {
1182 newCfg := *goodCfg

Callers 3

TestKillQueryFunction · 0.85

Calls 1

newConfiguredProxyFunction · 0.85

Tested by

no test coverage detected