TestSubConn implements the SubConn interface, to be used in tests.
| 36 | |
| 37 | // TestSubConn implements the SubConn interface, to be used in tests. |
| 38 | type 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 |
nothing calls this directly
no outgoing calls
no test coverage detected