Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityChecker ¶
periodically check if there is any activity in the past t(a time) by receiving from the channel, if there is no, run the onInactive(); if there is, go on some goroutines will ReportActivity using the channel
func NewActivityChecker ¶
func NewActivityChecker(onInactive func(), timeout time.Duration) *ActivityChecker
func (*ActivityChecker) Finish ¶
func (t *ActivityChecker) Finish()
func (*ActivityChecker) SetTimeout ¶
func (t *ActivityChecker) SetTimeout(timeout time.Duration)
func (*ActivityChecker) Update ¶
func (t *ActivityChecker) Update()
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
Click to show internal directories.
Click to hide internal directories.