delayqueue

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func New

func New(tick time.Duration, wheelSize int64) *Queue

func (*Queue) Do

func (q *Queue) Do(ctx context.Context, key string, delay time.Duration, fn func(s Scheduler))

func (*Queue) Stop

func (q *Queue) Stop()

type Scheduler

type Scheduler interface {
	Retry(after time.Duration)
	ExecuteCount() int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL