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

Function init

balancer/weightedtarget/weightedtarget_test.go:163–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161const testBackendAddrsCount = 12
162
163func init() {
164 balancer.Register(newTestConfigBalancerBuilder())
165 for i := 0; i < testBackendAddrsCount; i++ {
166 testBackendAddrStrs = append(testBackendAddrStrs, fmt.Sprintf("%d.%d.%d.%d:%d", i, i, i, i, i))
167 }
168 wtbBuilder = balancer.Get(Name)
169 wtbParser = wtbBuilder.(balancer.ConfigParser)
170
171 NewRandomWRR = testutils.NewTestWRR
172}
173
174// Tests the behavior of the weighted_target LB policy when there are no targets
175// configured. It verifies that the LB policy sets the overall channel state to

Callers

nothing calls this directly

Calls 8

ConnectMethod · 0.95
RegisterFunction · 0.92
GetFunction · 0.92
RegisterFunction · 0.92
NewSubConnMethod · 0.65
ErrorfMethod · 0.65
UpdateStateMethod · 0.65

Tested by

no test coverage detected