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

Method getHost

scope.go:997–1000  ·  view source on GitHub ↗

getHost returns least loaded + round-robin host from cluster. Always returns non-nil.

()

Source from the content-addressed store, hash-verified

995//
996// Always returns non-nil.
997func (c *cluster) getHost() *topology.Node {
998 r := c.getReplica()
999 return r.getHost()
1000}
1001
1002type rateLimiter struct {
1003 counter

Callers 3

TestServeFunction · 0.95
TestGetHostFunction · 0.95
TestGetHostConcurrentFunction · 0.95

Calls 2

getReplicaMethod · 0.95
getHostMethod · 0.45

Tested by 3

TestServeFunction · 0.76
TestGetHostFunction · 0.76
TestGetHostConcurrentFunction · 0.76