NewManager creates a new idleness manager implementation for the given idle timeout. It begins in idle mode.
(cc ClientConn, timeout time.Duration)
| 72 | // NewManager creates a new idleness manager implementation for the |
| 73 | // given idle timeout. It begins in idle mode. |
| 74 | func NewManager(cc ClientConn, timeout time.Duration) *Manager { |
| 75 | return &Manager{ |
| 76 | cc: cc, |
| 77 | timeout: timeout, |
| 78 | actuallyIdle: true, |
| 79 | activeCallsCount: -math.MaxInt32, |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | // resetIdleTimerLocked resets the idle timer to the given duration. Called |
| 84 | // when exiting idle mode or when the timer fires and we need to reset it. |
no outgoing calls