Versions in this module Expand all Collapse all v1 v1.1.3 Oct 16, 2025 Changes in this version + func ExecTimeout(d time.Duration, name string, args ...string) error v1.1.2 Aug 20, 2025 Changes in this version + func PadString(str string, totalSize int) string + func SafeReadTomlFile(filename string, v any) error + func SafeWriteTomlFile(v any, filename string) error + type Cli struct + func NewCli(dsn string, timeout time.Duration) (*Cli, error) + func (cli *Cli) DeleteProcess(procName string) + func (cli *Cli) RestartProcess(procName string) + func (cli *Cli) Resurrect() + func (cli *Cli) Save() + func (cli *Cli) StartGoBin(sourcePath string, name string, keepAlive bool, args []string) + func (cli *Cli) StartProcess(procName string) + func (cli *Cli) Status() + func (cli *Cli) StopProcess(procName string) + type DecodableMaster struct + ErrFile string + OutFile string + PidFile string + Procs map[string]*Proc + SysFolder string + Watcher *Watcher + type GoBin struct + Args []string + KeepAlive bool + Name string + SourcePath string + type Master struct + ErrFile string + OutFile string + PidFile string + Procs map[string]ProcContainer + SysFolder string + Watcher *Watcher + func NewMaster(configFile string) *Master + func (master *Master) DeleteProcess(name string) error + func (master *Master) ListProcs() []ProcContainer + func (master *Master) Prepare(sourcePath string, name string, language string, keepAlive bool, args []string) (ProcPreparable, []byte, error) + func (master *Master) RestartProcess(name string) error + func (master *Master) Revive() error + func (master *Master) RunPreparable(procPreparable ProcPreparable) error + func (master *Master) SaveProcs() error + func (master *Master) SaveProcsLoop() + func (master *Master) StartProcess(name string) error + func (master *Master) Stop() error + func (master *Master) StopProcess(name string) error + func (master *Master) UpdateStatus() + func (master *Master) WatchProcs() + type Preparable struct + Args []string + Cmd string + Env []string + KeepAlive bool + Language string + Name string + SourcePath string + SysFolder string + func (preparable *Preparable) Identifier() string + func (preparable *Preparable) PrepareBin() ([]byte, error) + func (preparable *Preparable) Start() (ProcContainer, error) + type Proc struct + Args []string + Cmd string + Env []string + Errfile string + KeepAlive bool + Name string + Outfile string + Path string + Pid int + Pidfile string + Status *ProcStatus + func (proc *Proc) AddRestart() + func (proc *Proc) Delete() error + func (proc *Proc) ForceStop() error + func (proc *Proc) GetPid() int + func (proc *Proc) GetStatus() *ProcStatus + func (proc *Proc) GracefullyStop() error + func (proc *Proc) Identifier() string + func (proc *Proc) IsAlive() bool + func (proc *Proc) NotifyStopped() + func (proc *Proc) Restart() error + func (proc *Proc) SetStatus(status string) + func (proc *Proc) ShouldKeepAlive() bool + func (proc *Proc) Start() error + func (proc *Proc) Watch() (*os.ProcessState, error) + type ProcContainer interface + AddRestart func() + Delete func() error + ForceStop func() error + GetPid func() int + GetStatus func() *ProcStatus + GracefullyStop func() error + Identifier func() string + IsAlive func() bool + NotifyStopped func() + Restart func() error + SetStatus func(status string) + ShouldKeepAlive func() bool + Start func() error + Watch func() (*os.ProcessState, error) + type ProcDataResponse struct + KeepAlive bool + Name string + Pid int + Status *ProcStatus + type ProcPreparable interface + Identifier func() string + PrepareBin func() ([]byte, error) + Start func() (ProcContainer, error) + type ProcResponse struct + Procs []*ProcDataResponse + type ProcState struct + type ProcStatus struct + Restarts int + Status string + func (p *ProcStatus) AddRestart() + func (p *ProcStatus) SetStatus(status string) + type ProcWatcher struct + type RemoteClient struct + func StartRemoteClient(dsn string, timeout time.Duration) (*RemoteClient, error) + func (client *RemoteClient) DeleteProcess(procName string) error + func (client *RemoteClient) MonitStatus() (ProcResponse, error) + func (client *RemoteClient) RestartProcess(procName string) error + func (client *RemoteClient) Resurrect() error + func (client *RemoteClient) Save() error + func (client *RemoteClient) StartGoBin(sourcePath string, name string, keepAlive bool, args []string) error + func (client *RemoteClient) StartProcess(procName string) error + func (client *RemoteClient) StopProcess(procName string) error + type RemoteMaster struct + func StartRemoteMasterServer(dsn string, configFile string) (*RemoteMaster, error) + func (m *RemoteMaster) DeleteProcess(procName string, ack *bool) error + func (m *RemoteMaster) MonitStatus(req string, response *ProcResponse) error + func (m *RemoteMaster) RestartProcess(procName string, ack *bool) error + func (m *RemoteMaster) Resurrect(req string, ack *bool) error + func (m *RemoteMaster) Save(req string, ack *bool) error + func (m *RemoteMaster) StartGoBin(goBin *GoBin, ack *bool) error + func (m *RemoteMaster) StartProcess(procName string, ack *bool) error + func (m *RemoteMaster) Stop() error + func (m *RemoteMaster) StopProcess(procName string, ack *bool) error + type Watcher struct + func NewWatcher() *Watcher + func (watcher *Watcher) AddProcWatcher(proc ProcContainer) + func (watcher *Watcher) RestartProc() chan ProcContainer + func (watcher *Watcher) StopWatcher(identifier string) chan bool