MCPcopy Create free account
hub / github.com/PostHog/duckgres / peerManagerWith

Function peerManagerWith

cmd/cache-proxy/peers_test.go:56–60  ·  view source on GitHub ↗

peerManagerWith returns a PeerManager with the given peer addresses hardcoded, skipping DNS resolution entirely.

(peers []string)

Source from the content-addressed store, hash-verified

54 srv := httptest.NewServer(mux)
55 t.Cleanup(srv.Close)
56 return strings.TrimPrefix(srv.URL, "http://")
57}
58
59// peerManagerWith returns a PeerManager with the given peer addresses hardcoded,
60// skipping DNS resolution entirely.
61func peerManagerWith(peers []string) *PeerManager {
62 pm := NewPeerManager("test.svc", ":8081")
63 pm.peers = peers

Calls 1

NewPeerManagerFunction · 0.85

Tested by

no test coverage detected