Limit the number of goroutines used for the update of ingress status

This commit is contained in:
Manuel de Brito Fontes 2017-09-19 20:39:29 -03:00
parent f553e49988
commit 3afddc4ece
13 changed files with 1302 additions and 40 deletions

32
vendor/gopkg.in/go-playground/pool.v3/pool.go generated vendored Normal file
View file

@ -0,0 +1,32 @@
package pool
// Pool contains all information for a pool instance.
type Pool interface {
// Queue queues the work to be run, and starts processing immediately
Queue(fn WorkFunc) WorkUnit
// Reset reinitializes a pool that has been closed/cancelled back to a working
// state. if the pool has not been closed/cancelled, nothing happens as the pool
// is still in a valid running state
Reset()
// Cancel cancels any pending work still not committed to processing.
// Call Reset() to reinitialize the pool for use.
Cancel()
// Close cleans up pool data and cancels any pending work still not committed
// to processing. Call Reset() to reinitialize the pool for use.
Close()
// Batch creates a new Batch object for queueing Work Units separate from any
// others that may be running on the pool. Grouping these Work Units together
// allows for individual Cancellation of the Batch Work Units without affecting
// anything else running on the pool as well as outputting the results on a
// channel as they complete. NOTE: Batch is not reusable, once QueueComplete()
// has been called it's lifetime has been sealed to completing the Queued items.
Batch() Batch
}
// WorkFunc is the function type needed by the pool for execution
type WorkFunc func(wu WorkUnit) (interface{}, error)