queue

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnregisterQueue

func UnregisterQueue(entityID string) error

intended for testing (`go test -count XXX` needs this)

Types

type ActionQueue

type ActionQueue struct {
	EntityID string
	// contains filtered or unexported fields
}

concurrent-safe, deletable queue

func GetQueue

func GetQueue(entityID string) *ActionQueue

func RegisterNewQueue

func RegisterNewQueue(entityID string) (*ActionQueue, error)

func (*ActionQueue) Count

func (this *ActionQueue) Count() int

locked

func (*ActionQueue) Delete

func (this *ActionQueue) Delete(actionUUID string)

locked, idempotent

func (*ActionQueue) Peek

func (this *ActionQueue) Peek() Action

locked, however old call loses(return nil); new one wins. (for concurrent http get)

func (*ActionQueue) Peeking

func (this *ActionQueue) Peeking() bool

locked

func (*ActionQueue) Put

func (this *ActionQueue) Put(action Action)

locked

Jump to

Keyboard shortcuts

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