Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionStatus ¶
ActionStatus is the status of action.
type Controller ¶
type Controller struct {
System
}
Controller controls the System.
func (*Controller) Handle ¶
func (c *Controller) Handle(action *Action) *ActionStatus
Handle plays action.
type Launcher ¶
type Launcher struct {
// contains filtered or unexported fields
}
Launcher supervises the process status, start, stop and restart.
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor is the supervisor process control system.
func NewSupervisor ¶
func NewSupervisor(service string) *Supervisor
NewSupervisor creates new Supervisor instance.
func (*Supervisor) IsAlive ¶
func (s *Supervisor) IsAlive() (int, bool)
IsAlive gets results from `supervisorctl status [service]`
func (*Supervisor) Restart ¶
func (s *Supervisor) Restart() (bool, error)
Restart executes `supervisorctl restart [service]`
func (*Supervisor) Start ¶
func (s *Supervisor) Start() (bool, error)
Start executes `supervisorctl start [service]`
func (*Supervisor) Stop ¶
func (s *Supervisor) Stop() bool
Stop executes `supervisorctl stop [service]`
type System ¶
type System interface { // IsAlive checks process is alive. IsAlive() (int, bool) // Start starts process. Start() (bool, error) // Start restart process. Restart() (bool, error) // Stop stops process. Stop() bool }
System is the interface of process control system.
type Systemd ¶
type Systemd struct {
// contains filtered or unexported fields
}
Systemd is the systemd process control system.
Click to show internal directories.
Click to hide internal directories.