CurrentState returns the current aggregate conn state by evaluating the counters
()
| 60 | |
| 61 | // CurrentState returns the current aggregate conn state by evaluating the counters |
| 62 | func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State { |
| 63 | // Evaluate. |
| 64 | if cse.numReady > 0 { |
| 65 | return connectivity.Ready |
| 66 | } |
| 67 | if cse.numConnecting > 0 { |
| 68 | return connectivity.Connecting |
| 69 | } |
| 70 | if cse.numIdle > 0 { |
| 71 | return connectivity.Idle |
| 72 | } |
| 73 | return connectivity.TransientFailure |
| 74 | } |
no outgoing calls
no test coverage detected