queue

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* @Author: cnzf1 * @Date: 2022-12-12 15:22:54 * @LastEditors: cnzf1 * @LastEditTime: 2022-12-13 14:45:01 * @Description:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

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

func NewEventHandler

func NewEventHandler(h HandlerFunc, size ...int) *EventHandler

func (*EventHandler) Len

func (e *EventHandler) Len() int

func (*EventHandler) Push

func (e *EventHandler) Push(req lang.AnyType)

Push a request msg to handler

func (*EventHandler) Stop

func (e *EventHandler) Stop()

type HandlerFunc

type HandlerFunc func(lang.AnyType)

type Queue

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

func NewQueue

func NewQueue() *Queue

func (*Queue) Add

func (q *Queue) Add(item interface{})

func (*Queue) Done

func (q *Queue) Done(item interface{})

func (*Queue) Get

func (q *Queue) Get() (item interface{}, shutdown bool)

func (*Queue) Len

func (q *Queue) Len() int

func (*Queue) ProcessingLen

func (q *Queue) ProcessingLen() int

func (*Queue) ShutDown

func (q *Queue) ShutDown()

func (*Queue) ShutDownWithDrain

func (q *Queue) ShutDownWithDrain()

func (*Queue) ShuttingDown

func (q *Queue) ShuttingDown() bool

Jump to

Keyboard shortcuts

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