mem

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 7 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	MaxQueuedMsg    int
	InflightExpiry  time.Duration
	ClientID        string
	DefaultNotifier queue.Notifier
}

type Queue

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

func New

func New(opts Options) (*Queue, error)

func (*Queue) Add

func (q *Queue) Add(elem *queue.Elem) (err error)

func (*Queue) Clean

func (*Queue) Clean() error

func (*Queue) Close

func (q *Queue) Close() error

func (*Queue) Init

func (q *Queue) Init(opts *queue.InitOptions) error

func (*Queue) Read

func (q *Queue) Read(pids []packets.PacketID) (rs []*queue.Elem, err error)

func (*Queue) ReadInflight

func (q *Queue) ReadInflight(maxSize uint) (rs []*queue.Elem, err error)

func (*Queue) Remove

func (q *Queue) Remove(pid packets.PacketID) error

func (*Queue) Replace

func (q *Queue) Replace(elem *queue.Elem) (replaced bool, err error)

Jump to

Keyboard shortcuts

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