subworker

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orchestrator

type Orchestrator struct {
	svc.Worker

	TerminationGracePeriod time.Duration
	TerminationWaitPeriod  time.Duration
	// contains filtered or unexported fields
}

Orchestrator is a subclass of Nullworker which allows this worker to take on child workers and initialize them much like SVC does but in a slightly simpler way. The base worker is initialized and run last and shutdown first.

func NewOrchestrator

func NewOrchestrator(baseWorker svc.Worker) *Orchestrator

func (*Orchestrator) AddSubWorker

func (s *Orchestrator) AddSubWorker(name string, w svc.Worker) error

func (*Orchestrator) Init

func (s *Orchestrator) Init(l *zap.Logger) error

func (*Orchestrator) Run

func (s *Orchestrator) Run() error

func (*Orchestrator) Terminate

func (s *Orchestrator) Terminate() error

Jump to

Keyboard shortcuts

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