Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer keeps track of the request activity and notifies registered channels once an idle timeout has been reached.
func NewTimer ¶
NewTimer creates a new Timer that will send notifications on any registered channels once the idle timeout has been reached.
func (*Timer) Register ¶
func (t *Timer) Register(c chan struct{})
Register adds a channel that will be notified once the idle timeout is reached.
func (*Timer) ResetTimer ¶
func (t *Timer) ResetTimer()
ResetTimer resets the idle timer countdown. It should be called once at the start of every new request.
Click to show internal directories.
Click to hide internal directories.