Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeOverseer ¶
type TimeOverseer struct {
// contains filtered or unexported fields
}
TimeOverseer checks we receive at least one msg in d duration. If not, checker will print a warn message.
func NewTimeOverseer ¶
func NewTimeOverseer(d time.Duration) *TimeOverseer
NewTimeOverseer creates a long term checker specified name, checking interval and warning string to print
func (*TimeOverseer) Start ¶
func (c *TimeOverseer) Start() <-chan struct{}
Start starts the check process
type TimeRecorder ¶
type TimeRecorder struct {
// contains filtered or unexported fields
}
TimeRecorder provides methods to record time duration
func NewTimeRecorder ¶
func NewTimeRecorder() *TimeRecorder
NewTimeRecorder creates a new TimeRecorder
func (*TimeRecorder) Duration ¶
func (tr *TimeRecorder) Duration() time.Duration
Duration returns the duration from last record
func (*TimeRecorder) Elapse ¶
func (tr *TimeRecorder) Elapse() time.Duration
Elapse returns the duration from the beginning
Click to show internal directories.
Click to hide internal directories.