Documentation ¶
Overview ¶
Package workpool implements a workpool synchronized on a work item's Key. in the course of the workpool's life, two times the number of unique keys can be created one goroutine per key max for parallel processing another goroutine per key max for work queue management
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Work ¶
type Work interface { // Key should return a value that identifies what the work is being performed on //For example: //If account "a" has a creation event, followed by an update, then a cancellation event //All three events should return "a". This will cause the creation event to process, and the update/cancellation events to queue Key() string // Do should perform the actual work required. Do is called in its own goroutine Do() }
Work is the interface for callers to use this library. Each unit of work (such as an event) must implement the Work interface
Click to show internal directories.
Click to hide internal directories.