Documentation
¶
Overview ¶
Package workermanager provides a robust worker management system with graceful reconnection and exponential backoff for handling network operations that may fail.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerManager ¶
type WorkerManager struct {
// contains filtered or unexported fields
}
WorkerManager manages worker goroutines with graceful reconnection
func NewWorkerManager ¶
func NewWorkerManager(logger *zap.Logger, workerCount int, workerFunc func(id int)) *WorkerManager
NewWorkerManager creates a new worker manager
func (*WorkerManager) GetActiveWorkerCount ¶
func (wm *WorkerManager) GetActiveWorkerCount() int
GetActiveWorkerCount returns the current number of active workers
func (*WorkerManager) Start ¶
func (wm *WorkerManager) Start()
Start starts the worker manager and spawns initial workers
func (*WorkerManager) Stop ¶
func (wm *WorkerManager) Stop()
Stop stops the worker manager and waits for all workers to finish
Click to show internal directories.
Click to hide internal directories.