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

Method Build

test/end2end_test.go:7200–7214  ·  view source on GitHub ↗
(cc balancer.ClientConn, bOpts balancer.BuildOptions)

Source from the content-addressed store, hash-verified

7198type triggerRPCBlockPickerBalancerBuilder struct{}
7199
7200func (triggerRPCBlockPickerBalancerBuilder) Build(cc balancer.ClientConn, bOpts balancer.BuildOptions) balancer.Balancer {
7201 b := &triggerRPCBlockBalancer{
7202 blockingPickerDone: grpcsync.NewEvent(),
7203 ClientConn: cc,
7204 }
7205 // round_robin child to complete balancer tree with a usable leaf policy and
7206 // have RPCs actually work.
7207 builder := balancer.Get(roundrobin.Name)
7208 rr := builder.Build(b, bOpts)
7209 if rr == nil {
7210 panic("round robin builder returned nil")
7211 }
7212 b.Balancer = rr
7213 return b
7214}
7215
7216func (triggerRPCBlockPickerBalancerBuilder) ParseConfig(json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
7217 return &bpbConfig{}, nil

Callers

nothing calls this directly

Calls 3

NewEventFunction · 0.92
GetFunction · 0.92
BuildMethod · 0.65

Tested by

no test coverage detected