queue

package
v0.0.0-...-0e8a67c Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2017 License: Apache-2.0 Imports: 12 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 {
	// contains filtered or unexported fields
}

Queue is a single-reader, multi-writer distributed queue.

func New

func New(ctx context.Context, client *v3.Client, mapID int64, factory *itxn.Factory) *Queue

New creates a new consistent, distributed queue.

func (*Queue) AdvanceEpoch

func (q *Queue) AdvanceEpoch() error

AdvanceEpoch submits an advance epoch request into the queue.

func (*Queue) Enqueue

func (q *Queue) Enqueue(key, value []byte) error

Enqueue submits a key, value pair into the queue.

func (*Queue) StartReceiving

func (q *Queue) StartReceiving(processFunc queue.ProcessKeyValueFunc, advanceFunc queue.AdvanceEpochFunc) (queue.Receiver, error)

StartReceiving starts receiving queue enqueued items. This function should be called as a Go routine.

Jump to

Keyboard shortcuts

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