MCPcopy
hub / github.com/go-kit/kit / Balancer

Interface Balancer

sd/lb/balancer.go:10–12  ·  view source on GitHub ↗

Balancer yields endpoints according to some heuristic.

Source from the content-addressed store, hash-verified

8
9// Balancer yields endpoints according to some heuristic.
10type Balancer interface {
11 Endpoint() (endpoint.Endpoint, error)
12}
13
14// ErrNoEndpoints is returned when no qualifying endpoints are available.
15var ErrNoEndpoints = errors.New("no endpoints available")

Callers 8

TestEncodeJSONRequestFunction · 0.65
TestSetClientFunction · 0.65
TestNewExplicitClientFunction · 0.65
ServeHTTPMethod · 0.65
NewClientFunction · 0.65
TestEncodeJSONRequestFunction · 0.65
TestRoundRobinFunction · 0.65

Implementers 7

Clienttransport/http/client.go
Clienttransport/http/jsonrpc/client.go
Clienttransport/grpc/client.go
Publishertransport/nats/publisher.go
Publishertransport/amqp/publisher.go
roundRobinsd/lb/round_robin.go
randomsd/lb/random.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…