MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / newMockScope

Function newMockScope

proxyretry_test.go:234–251  ·  view source on GitHub ↗
(hs []string)

Source from the content-addressed store, hash-verified

232}
233
234func newMockScope(hs []string) *scope {
235 c := newHostsCluster(hs)
236 scopedHost := c.replicas[0].hosts[0]
237 scopedHost.IncrementConnections()
238
239 return &scope{
240 startTime: time.Now(),
241 host: scopedHost,
242 cluster: c,
243 labels: prometheus.Labels{
244 "user": "default",
245 "cluster": "default",
246 "cluster_user": "default",
247 "replica": "default",
248 "cluster_node": "default",
249 },
250 }
251}
252
253func mockStatRW(s *scope) *mockStatResponseWriter {
254

Callers 3

TestQueryWithRetryFailFunction · 0.85
TestQuerySuccessOnceFunction · 0.85

Calls 2

newHostsClusterFunction · 0.85
IncrementConnectionsMethod · 0.80

Tested by

no test coverage detected