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 |
Click to show internal directories.
Click to hide internal directories.