discovery

package
v2.0.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue() *Queue

func (*Queue) Consume

func (q *Queue) Consume() inst.InstanceKey

Consume fetches a key to process; blocks if queue is empty. Release must be called once after Consume.

func (*Queue) Len

func (q *Queue) Len() int

func (*Queue) Push

func (q *Queue) Push(key inst.InstanceKey)

Push enqueues a key if it is not on a queue and is not being processed; silently returns otherwise.

func (*Queue) Release

func (q *Queue) Release(key inst.InstanceKey)

Release removes a key from a list of being processed keys which allows that key to be pushed into the queue again.

Jump to

Keyboard shortcuts

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