supervisor

package
v0.0.0-...-49cae94 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Supervisor

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

func NewSupervisor

func NewSupervisor(config SupervisorConfig,
	newWorkerFunc worker.NewWorkerFunc,
	logger *zap.Logger) (*Supervisor, error)

func (*Supervisor) IsHealthy

func (s *Supervisor) IsHealthy() bool

func (*Supervisor) Run

func (s *Supervisor) Run(ctx context.Context, cancel context.CancelFunc) error

type SupervisorConfig

type SupervisorConfig struct {
	Workers []worker.WorkerConfig `yaml:"workers"`
}

func (*SupervisorConfig) IsValid

func (s *SupervisorConfig) IsValid() error

type WorkerPoolAbstraction

type WorkerPoolAbstraction interface {
	RunAll()
	InterruptWorker(id string)
	InterruptAll()
	ForceTerminateWorker(id string)
	WaitForWorkerToCleanBuffer(id string) error
	RestartWorker(options cmd.Options, id string) error
	IsHealthy() bool
	HasProxy() bool
	RunningCount() int
}

type WorkerPoolInfo

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

Jump to

Keyboard shortcuts

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