supervisor

package
v0.0.0-...-b81969c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("service not found")

Functions

This section is empty.

Types

type ProcessExit

type ProcessExit struct {
	PID    int
	Status syscall.WaitStatus
}

ProcessExit contains information about an exited process

type ServiceStatus

type ServiceStatus struct {
	Name        string
	Description string
	Type        string
	Restart     string
	Running     bool
	Started     bool
	Failed      bool
	PID         int
}

ServiceStatus represents the current status of a service

type Supervisor

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

func NewSupervisor

func NewSupervisor() *Supervisor

NewSupervisor creates a new supervisor instance

func (*Supervisor) ExitChannel

func (sv *Supervisor) ExitChannel() chan<- ProcessExit

ExitChannel returns the channel for receiving process exit information

func (*Supervisor) GetServiceStatus

func (sv *Supervisor) GetServiceStatus(name string) (*ServiceStatus, error)

ServiceStatus returns the status of a specific service

func (*Supervisor) ListServices

func (sv *Supervisor) ListServices() []ServiceStatus

ListServices returns the status of all services

func (*Supervisor) LoadInternalService

func (sv *Supervisor) LoadInternalService(s *service.Service)

func (*Supervisor) LoadService

func (sv *Supervisor) LoadService(name string) error

func (*Supervisor) LoadServices

func (sv *Supervisor) LoadServices(names ...string) []error

func (*Supervisor) RestartService

func (sv *Supervisor) RestartService(name string) error

RestartService restarts a specific service by name

func (*Supervisor) StartAll

func (sv *Supervisor) StartAll()

func (*Supervisor) StartService

func (sv *Supervisor) StartService(name string) error

StartService starts a specific service by name

func (*Supervisor) Stop

func (sv *Supervisor) Stop()

func (*Supervisor) StopService

func (sv *Supervisor) StopService(name string) error

StopService stops a specific service by name

func (*Supervisor) Supervise

func (sv *Supervisor) Supervise()

Jump to

Keyboard shortcuts

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