backlog

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoMoreObjects is returned on Pop() when there are no more objects
	// to return
	ErrNoMoreObjects = errors.New("no more objects")
	// ErrAlreadyExists is returned on Push() when combination of object/key
	// already exists
	ErrAlreadyExists = errors.New("already exists")
)

Functions

This section is empty.

Types

type AckFunc

type AckFunc func()

AckFunc allows the handler of a popped object to acknowledge it has been handled and thus can be removed from the backlog.

type Backlog

type Backlog interface {
	Push(object.Object, ...*crypto.PublicKey) error
	Pop(*crypto.PublicKey) (object.Object, AckFunc, error)
}

Backlog keeps track of objects than need to be sent to each recipient.

Jump to

Keyboard shortcuts

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