Documentation
¶
Index ¶
- type Options
- type Supervisor
- func (s *Supervisor) RestartService(ctx context.Context, st *state.State, spec engine.ServiceSpec) error
- func (s *Supervisor) Start(ctx context.Context, plan engine.LaunchPlan) (*state.State, error)
- func (s *Supervisor) StartService(ctx context.Context, st *state.State, spec engine.ServiceSpec) error
- func (s *Supervisor) Stop(ctx context.Context, st *state.State) error
- func (s *Supervisor) StopService(ctx context.Context, st *state.State, name string) error
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 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) StopService ¶ added in v0.0.6
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.
Click to show internal directories.
Click to hide internal directories.