queue

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyQueue

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

AnyQueue is a queue stores interface{}

func NewAnyQueue

func NewAnyQueue(eq func(a interface{}, b interface{}) bool, aa ...interface{}) *AnyQueue

NewAnyQueue builds a AnyQueue

func (*AnyQueue) Get

func (q *AnyQueue) Get(val interface{}) interface{}

Get returns previous stored value that equals to val and remove it from the queue, if not found, return nil

func (*AnyQueue) Put

func (q *AnyQueue) Put(val interface{})

Put inserts `val` into `q`.

Jump to

Keyboard shortcuts

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