Help us shape the future of Go! Take the 2026 Go Developer Survey

deque

package
v0.4.48 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package deque implements a simple queue of block hashes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue provides a FIFO queue.

func New

func New(initialCapacity int) *Queue

New instantiates a new queue.

func (*Queue) Cap

func (q *Queue) Cap() int

Cap returns the current capacity of the queue.

func (*Queue) Len

func (q *Queue) Len() int

Len returns the number of elements in the queue.

func (*Queue) Pop

func (q *Queue) Pop() flow.Identifier

Pop removes the element from the head of the queue and returns it. If the queue is empty, it returns nil.

func (*Queue) Push

func (q *Queue) Push(elem flow.Identifier)

Push appends the element to the end of the queue.

Jump to

Keyboard shortcuts

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