queuer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package queuer defines an interface used to queue and execute an action on items

Index

Constants

This section is empty.

Variables

View Source
var ErrDuplicate = errors.New("duplicate url")

ErrDuplicate is returned by Push when the URL has been pushed before

View Source
var ErrFull = errors.New("queue full")

ErrFull is returned by Push when the queue is full

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Start(action func(string)) // Start starts processing the queue.
	Push(item string) error    // Push attempts to add an item to the queue. On failure, returns ErrDuplicate or ErrFull.
	Wait()                     // Wait waits for all items to be processed before returning.
}

Interface is used to queue and execute an action on items

Directories

Path Synopsis
Package concurrentqueuer defines a queuer.Interface that runs several workers concurrently on a queue
Package concurrentqueuer defines a queuer.Interface that runs several workers concurrently on a queue

Jump to

Keyboard shortcuts

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