type TimeoutDetector … // NewTimeoutDetector creates the TimeoutDetector. func NewTimeoutDetector(maxDuration time.Duration) *TimeoutDetector { … } // Reset resets the NewTimeoutDetector. func (td *TimeoutDetector) Reset() { … } // Observe observes an event for given id. It returns false and exceeded duration // if the interval is longer than the expectation. func (td *TimeoutDetector) Observe(which uint64) (bool, time.Duration) { … }