Documentation
¶
Index ¶
- func Add(job func() error) chan error
- func GetWorkerCount() int
- func Wait()
- type Dispatcher
- func AutoScale() *Dispatcher
- func DownScale(workerCount int) *Dispatcher
- func Get(maxWorker int) *Dispatcher
- func GetInstance() *Dispatcher
- func New(maxWorker int) *Dispatcher
- func Reset() *Dispatcher
- func SafeReset() *Dispatcher
- func Start() *Dispatcher
- func StartWithContext(c context.Context) *Dispatcher
- func StartWorkerObserver() *Dispatcher
- func Stop(immediately bool) *Dispatcher
- func UpScale(workerCount int) *Dispatcher
- func (d *Dispatcher) Add(job func() error) chan error
- func (d *Dispatcher) AutoScale() *Dispatcher
- func (d *Dispatcher) DownScale(workerCount int) *Dispatcher
- func (d *Dispatcher) GetWorkerCount() int
- func (d *Dispatcher) QueueRunner() *Dispatcher
- func (d *Dispatcher) Reset() *Dispatcher
- func (d *Dispatcher) SafeReset() *Dispatcher
- func (d *Dispatcher) ScaleBuffer(size int) *Dispatcher
- func (d *Dispatcher) Start() *Dispatcher
- func (d *Dispatcher) StartWithContext(c context.Context) *Dispatcher
- func (d *Dispatcher) StartWorkerObserver() *Dispatcher
- func (d *Dispatcher) Stop(immediately bool) *Dispatcher
- func (d *Dispatcher) UpScale(workerCount int) *Dispatcher
- func (d *Dispatcher) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWorkerCount ¶
func GetWorkerCount() int
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func AutoScale ¶
func AutoScale() *Dispatcher
func DownScale ¶
func DownScale(workerCount int) *Dispatcher
func Get ¶
func Get(maxWorker int) *Dispatcher
func GetInstance ¶
func GetInstance() *Dispatcher
func New ¶
func New(maxWorker int) *Dispatcher
func Reset ¶
func Reset() *Dispatcher
func SafeReset ¶
func SafeReset() *Dispatcher
func Start ¶
func Start() *Dispatcher
func StartWithContext ¶
func StartWithContext(c context.Context) *Dispatcher
func StartWorkerObserver ¶
func StartWorkerObserver() *Dispatcher
func Stop ¶
func Stop(immediately bool) *Dispatcher
func UpScale ¶
func UpScale(workerCount int) *Dispatcher
func (*Dispatcher) Add ¶
func (d *Dispatcher) Add(job func() error) chan error
func (*Dispatcher) AutoScale ¶
func (d *Dispatcher) AutoScale() *Dispatcher
func (*Dispatcher) DownScale ¶
func (d *Dispatcher) DownScale(workerCount int) *Dispatcher
func (*Dispatcher) GetWorkerCount ¶
func (d *Dispatcher) GetWorkerCount() int
GetWorkerCount returns current worker count this function will be blocking while worker scaling
func (*Dispatcher) QueueRunner ¶
func (d *Dispatcher) QueueRunner() *Dispatcher
func (*Dispatcher) Reset ¶
func (d *Dispatcher) Reset() *Dispatcher
func (*Dispatcher) SafeReset ¶
func (d *Dispatcher) SafeReset() *Dispatcher
func (*Dispatcher) ScaleBuffer ¶
func (d *Dispatcher) ScaleBuffer(size int) *Dispatcher
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start() *Dispatcher
func (*Dispatcher) StartWithContext ¶
func (d *Dispatcher) StartWithContext(c context.Context) *Dispatcher
func (*Dispatcher) StartWorkerObserver ¶
func (d *Dispatcher) StartWorkerObserver() *Dispatcher
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop(immediately bool) *Dispatcher
func (*Dispatcher) UpScale ¶
func (d *Dispatcher) UpScale(workerCount int) *Dispatcher
func (*Dispatcher) Wait ¶
func (d *Dispatcher) Wait()
Click to show internal directories.
Click to hide internal directories.

