Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTicker ¶
type DefaultTicker struct { Ticker // contains filtered or unexported fields }
DefaultTicker defines the template method to run periodically.
func NewDefaultTicker ¶
func NewDefaultTicker(normalInterval, errorInterval time.Duration) *DefaultTicker
NewDefaultTicker creates a DefaultTicker instance
func (*DefaultTicker) DoTick ¶
func (s *DefaultTicker) DoTick(ctx context.Context)
DoTick checks whether needs to check and calls TickImpl if needed.
func (*DefaultTicker) SetNextCheckTime ¶
func (s *DefaultTicker) SetNextCheckTime(t time.Time)
SetNextCheckTime sets the next check time if ticker has checked or the given check time hits (lastCheckTime, nextCheckTime)
Click to show internal directories.
Click to hide internal directories.