queue

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackFunc

type CallBackFunc func(obj interface{})

type Queue

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

func NewQueue

func NewQueue(capacity, worker int, workFunc WorkFunc, onSuccess, onFail CallBackFunc, stopCh <-chan struct{}) *Queue

func (*Queue) Push

func (q *Queue) Push(key string, value interface{})

func (*Queue) PushAfter

func (q *Queue) PushAfter(key string, value interface{}, after time.Duration)

func (*Queue) Run

func (q *Queue) Run()

type WorkFunc

type WorkFunc func(obj interface{}) error

Jump to

Keyboard shortcuts

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