workermanager

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL