bufferqueue

package
v0.0.0-...-99a0925 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0, BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package bufferqueue implements a buffer queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferQueue

type BufferQueue interface {
	PushItem(i *Item)

	Push(any interface{})

	Pop() interface{}

	Len() int

	Workings() int32

	SetLimit(n int64)

	GraceFullStop(ctx context.Context)
}

func New

func New(opt *Options) BufferQueue

type Item

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

type Options

type Options struct {
	Limit int64
}

type TimeSortedQueue

type TimeSortedQueue []*Item

func (TimeSortedQueue) Len

func (pq TimeSortedQueue) Len() int

func (TimeSortedQueue) Less

func (pq TimeSortedQueue) Less(i, j int) bool

func (*TimeSortedQueue) Pop

func (pq *TimeSortedQueue) Pop() interface{}

func (*TimeSortedQueue) Push

func (pq *TimeSortedQueue) Push(x interface{})

func (TimeSortedQueue) Swap

func (pq TimeSortedQueue) Swap(i, j int)

type WorkHandler

type WorkHandler interface {
	Handle()
}

Jump to

Keyboard shortcuts

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