inflight

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2019 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = fmt.Errorf("queue not found")
	ErrMessageNotFound = fmt.Errorf("message not found")
)

Functions

This section is empty.

Types

type Message

type Message struct {
	ID      int32
	Publish *packet.Publish
	// contains filtered or unexported fields
}

type MessageList

type MessageList []*Message

func (MessageList) Apply

func (m MessageList) Apply(f func(*Message))

func (MessageList) ApplyE

func (m MessageList) ApplyE(f func(*Message) error) (err error)

func (MessageList) Filter

func (m MessageList) Filter(f func(*Message) bool) MessageList

func (MessageList) Find

func (m MessageList) Find(f func(*Message) bool) *Message

type Queue

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

func New

func New(depth int) *Queue

func (*Queue) Acknowledge

func (q *Queue) Acknowledge(messageID int32) error

func (*Queue) Capacity

func (q *Queue) Capacity() int

func (*Queue) Close

func (q *Queue) Close() error

func (*Queue) Empty

func (q *Queue) Empty()

func (*Queue) ExpireInflight

func (q *Queue) ExpireInflight()

func (*Queue) InflightCount

func (q *Queue) InflightCount() int

func (*Queue) Insert

func (q *Queue) Insert(p *packet.Publish) error

func (*Queue) MessageCount

func (q *Queue) MessageCount() int

func (*Queue) Next

func (q *Queue) Next() *Message

Jump to

Keyboard shortcuts

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