Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
func MetricsTags ¶
func MetricsTags(tags ...interface{}) Option
type TimingWheel ¶
type TimingWheel struct {
// contains filtered or unexported fields
}
TimingWheel manages all the timed task.
func NewTimingWheel ¶
func NewTimingWheel(ctx context.Context, setters ...Option) *TimingWheel
NewTimingWheel returns a *TimingWheel ready for use.
func (*TimingWheel) AddTimer ¶
func (tw *TimingWheel) AddTimer(after, interval time.Duration, setters ...func(c *Context)) (*Context, error)
AddTimer adds new timed task.
func (*TimingWheel) CancelTimer ¶
func (tw *TimingWheel) CancelTimer(ctx *Context)
func (*TimingWheel) TimeOutChannel ¶
func (tw *TimingWheel) TimeOutChannel() chan *Context
TimeOutChannel returns the timeout channel.
Click to show internal directories.
Click to hide internal directories.