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

Struct TestSubConn

internal/testutils/balancer.go:38–47  ·  view source on GitHub ↗

TestSubConn implements the SubConn interface, to be used in tests.

Source from the content-addressed store, hash-verified

36
37// TestSubConn implements the SubConn interface, to be used in tests.
38type TestSubConn struct {
39 balancer.SubConn
40 tcc *BalancerClientConn // the CC that owns this SubConn
41 id string
42 ConnectCh chan struct{}
43 stateListener func(balancer.SubConnState)
44 healthListener func(balancer.SubConnState)
45 connectCalled *grpcsync.Event
46 Addresses []resolver.Address
47}
48
49// NewTestSubConn returns a newly initialized SubConn. Typically, subconns
50// should be created via TestClientConn.NewSubConn instead, but can be useful

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected