Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCommand ¶
ExecCommand command execution
Types ¶
type ActionStatus ¶
ActionStatus is the status of action.
type Launcher ¶
type Launcher struct {
// contains filtered or unexported fields
}
Launcher supervises the process status, start, stop and restart.
type Stats ¶
type Stats interface { // Reset the RabbitMQ StatsDB, A node may be randomly selected Reset() (bool, string, error) // Terminate the RabbitMQ StatsDB, Not to choose the node Terminate() (bool, string, error) // Crash the RabbitMQ StatsDB, Not to choose the node Crash() (bool, string, error) }
Stats represents a stats interface
type StatsController ¶
type StatsController struct {
Stats
}
StatsController controls the RabbitMQ StatsDB
func (*StatsController) Handle ¶
func (c *StatsController) Handle(action *Action) *ActionStatus
Handle handle action
type StatsDBCtl ¶
type StatsDBCtl struct {
// contains filtered or unexported fields
}
StatsDBCtl is the RabbitMQ statsdb control system
func NewStatsDBCtl ¶
func NewStatsDBCtl() *StatsDBCtl
NewStatsDBCtl creates a new StatsDBCtl instance
func (*StatsDBCtl) Crash ¶
func (s *StatsDBCtl) Crash() (bool, string, error)
Crash crash the RabbitMQ statsdb
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 SysController ¶
type SysController struct {
System
}
SysController controls the System.
func (*SysController) Handle ¶
func (c *SysController) Handle(action *Action) *ActionStatus
Handle plays action.
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.