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

Method Build

balancer/roundrobin/roundrobin.go:49–58  ·  view source on GitHub ↗
(cc balancer.ClientConn, opts balancer.BuildOptions)

Source from the content-addressed store, hash-verified

47}
48
49func (bb builder) Build(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer {
50 childBuilder := balancer.Get(pickfirst.Name).Build
51 bal := &rrBalancer{
52 cc: cc,
53 Balancer: endpointsharding.NewBalancer(cc, opts, childBuilder, endpointsharding.Options{}),
54 }
55 bal.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[%p] ", bal))
56 bal.logger.Infof("Created")
57 return bal
58}
59
60type rrBalancer struct {
61 balancer.Balancer

Callers

nothing calls this directly

Calls 3

GetFunction · 0.92
NewBalancerFunction · 0.92
InfofMethod · 0.65

Tested by

no test coverage detected