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

Method Build

clientconn_test.go:982–990  ·  view source on GitHub ↗
(cc balancer.ClientConn, opts balancer.BuildOptions)

Source from the content-addressed store, hash-verified

980}
981
982func (b *stateRecordingBalancerBuilder) Build(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer {
983 stateNotifications := make(chan connectivity.State, 10)
984 b.mu.Lock()
985 b.notifier = stateNotifications
986 b.mu.Unlock()
987 return &stateRecordingBalancer{
988 Balancer: balancer.Get("pick_first").Build(&stateRecordingCCWrapper{cc, stateNotifications}, opts),
989 }
990}
991
992func (b *stateRecordingBalancerBuilder) nextStateNotifier() <-chan connectivity.State {
993 b.mu.Lock()

Callers

nothing calls this directly

Calls 4

GetFunction · 0.92
BuildMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected