MCPcopy
hub / github.com/grpc/grpc-go / Build

Method Build

balancer/ringhash/ringhash.go:67–77  ·  view source on GitHub ↗
(cc balancer.ClientConn, opts balancer.BuildOptions)

Source from the content-addressed store, hash-verified

65type bb struct{}
66
67func (bb) Build(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer {
68 b := &ringhashBalancer{
69 ClientConn: cc,
70 endpointStates: resolver.NewEndpointMap[*endpointState](),
71 }
72 esOpts := endpointsharding.Options{DisableAutoReconnect: true}
73 b.child = endpointsharding.NewBalancer(b, opts, lazyPickFirstBuilder, esOpts)
74 b.logger = prefixLogger(b)
75 b.logger.Infof("Created")
76 return b
77}
78
79func (bb) Name() string {
80 return Name

Callers

nothing calls this directly

Calls 3

NewBalancerFunction · 0.92
prefixLoggerFunction · 0.70
InfofMethod · 0.65

Tested by

no test coverage detected