supervisor

package
v0.0.0-...-e60c870 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Child

type Child struct {
	IsRunning bool
	Name      string
	// contains filtered or unexported fields
}

type Supervisor

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

func NewSupervisor

func NewSupervisor() *Supervisor

func (*Supervisor) AddProc

func (s *Supervisor) AddProc(proc *proc.Process) *Child

func (*Supervisor) AddSigHandler

func (s *Supervisor) AddSigHandler(handler func(), signals ...os.Signal)

func (*Supervisor) AddTask

func (s *Supervisor) AddTask(name string, task Task) *Child

func (*Supervisor) Start

func (s *Supervisor) Start()

func (*Supervisor) Stop

func (s *Supervisor) Stop()

func (*Supervisor) Wait

func (s *Supervisor) Wait()

type Task

type Task func(ctx context.Context) error

Jump to

Keyboard shortcuts

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