queueEngine

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

* * @Author: TheLife * @Date: 2021/5/29 下午2:38

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(chanLen int, fail ...Fail) *Engine

func (*Engine) Customer

func (e *Engine) Customer(callback func(Queue) bool, finishCallbacks ...func())

消费

func (*Engine) Len

func (e *Engine) Len() int

等待消费数量

func (*Engine) Producer

func (e *Engine) Producer(data Queue)

生产

func (*Engine) ProducerFinish

func (e *Engine) ProducerFinish()

生产完成

type Fail

type Fail struct {
	Wait time.Duration
	// contains filtered or unexported fields
}

type Queue

type Queue struct {
	Data      interface{}
	FailCount int
}

Jump to

Keyboard shortcuts

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