workers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UndefinedVoteStrategyWasGivenError = errors.New("undefined vote strategy was given, check your input")
	UndefinedSpawnVoterWasGivenError   = errors.New("undefined spawn voter was given, check your input")
	UndefinedCloseVoterWasGivenError   = errors.New("undefined close voter was given, check your input")
)

Functions

This section is empty.

Types

type Balancer

type Balancer interface {
	CurrentAction() (action enum.Action, sleep time.Duration)
}

type BalancerService

type BalancerService struct {
	// contains filtered or unexported fields
}

func NewBalancerService

func NewBalancerService(
	ctx context.Context,
	cfg *config.Config,
	logger logservice.Logger,
	collector statservice.Collector,
) *BalancerService

func (*BalancerService) CurrentAction

func (s *BalancerService) CurrentAction() (action enum.Action, sleep time.Duration)

type Manager

type Manager interface {
	SpawnOne(ctx context.Context, wg *sync.WaitGroup, sendTicker *time.Ticker)
	CloseOne()
	CloseAll(cancel context.CancelFunc, wg *sync.WaitGroup)
}

type ManagerService

type ManagerService struct {
	// contains filtered or unexported fields
}

func NewManagerService

func NewManagerService(
	ctx context.Context,
	sender *sender.Http,
	logger logservice.Logger,
	collector statservice.Collector,
) *ManagerService

func (*ManagerService) CloseAll

func (m *ManagerService) CloseAll(cancel context.CancelFunc, wg *sync.WaitGroup)

func (*ManagerService) CloseOne

func (m *ManagerService) CloseOne()

func (*ManagerService) SpawnOne

func (m *ManagerService) SpawnOne(ctx context.Context, wg *sync.WaitGroup, sendTicker *time.Ticker)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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