supervise

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	RepoRoot        string
	ShutdownTimeout time.Duration
	ReadyTimeout    time.Duration
	WrapperExe      string
}

type Supervisor

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

func New

func New(opts Options) *Supervisor

func (*Supervisor) RestartService added in v0.0.6

func (s *Supervisor) RestartService(ctx context.Context, st *state.State, spec engine.ServiceSpec) error

RestartService stops and then starts a single named service from a freshly resolved ServiceSpec.

func (*Supervisor) Start

func (s *Supervisor) Start(ctx context.Context, plan engine.LaunchPlan) (*state.State, error)

func (*Supervisor) StartService added in v0.0.6

func (s *Supervisor) StartService(ctx context.Context, st *state.State, spec engine.ServiceSpec) error

StartService starts a single named service from a freshly resolved ServiceSpec. It creates new log files, starts the process, waits for health checks, and updates the state file.

func (*Supervisor) Stop

func (s *Supervisor) Stop(ctx context.Context, st *state.State) error

func (*Supervisor) StopService added in v0.0.6

func (s *Supervisor) StopService(ctx context.Context, st *state.State, name string) error

StopService stops a single named service, clears its PID in the state, and saves the updated state file. The service record is kept so it can be restarted later.

Jump to

Keyboard shortcuts

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