Documentation ¶
Overview ¶
Queue manager for executing jobs, handling deduplication of requests, and limiting the consumption of resources by a server. Allows callers to "join" an existing job and listen to the output provided by that job without reexecuting the actual task.
Provides Dispatcher, a reactor pattern implementation that processes jobs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { QueueFast int QueueSlow int Concurrent int TrackDuplicateIds int // contains filtered or unexported fields }
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(id jobs.RequestIdentifier, j jobs.Job, resp jobs.Response) (done <-chan bool, err error)
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start()
type RequestIdentifierMap ¶
type RequestIdentifierMap struct {
// contains filtered or unexported fields
}
func NewRequestIdentifierMap ¶
func NewRequestIdentifierMap(size int) *RequestIdentifierMap
func (RequestIdentifierMap) Get ¶
func (m RequestIdentifierMap) Get(id jobs.RequestIdentifier) interface{}
func (RequestIdentifierMap) Put ¶
func (m RequestIdentifierMap) Put(id jobs.RequestIdentifier, v interface{}) (interface{}, bool)
Click to show internal directories.
Click to hide internal directories.