opqueue

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemQueue

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

MemQueue implements an in-memory operation queue.

func (*MemQueue) Add

func (q *MemQueue) Add(data *operation.QueuedOperation, protocolVersion uint64) (uint, error)

Add adds the given data to the tail of the queue and returns the new length of the queue.

func (*MemQueue) Len

func (q *MemQueue) Len() uint

Len returns the length of the queue.

func (*MemQueue) Peek

Peek returns (up to) the given number of operations from the head of the queue but does not remove them.

func (*MemQueue) Remove

func (q *MemQueue) Remove(num uint) (ops operation.QueuedOperationsAtTime, ack func() uint, nack func(error), err error)

Remove removes (up to) the given number of items from the head of the queue.

Jump to

Keyboard shortcuts

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