Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcStatus ¶
type ProcStatus struct {
// contains filtered or unexported fields
}
ProcStatus is a wrapper with the process state and an error in case there's any.
type ProcWatcher ¶
type ProcWatcher struct {
// contains filtered or unexported fields
}
ProcWatcher is a wrapper that act as a object that watches a process.
type Watcher ¶
Watcher is responsible for watching a list of processes and report to Master in case the process dies at some point.
func InitWatcher ¶
func InitWatcher() *Watcher
InitWatcher will create a Watcher instance. Returns a Watcher instance.
func (*Watcher) AddProcWatcher ¶
func (watcher *Watcher) AddProcWatcher(proc process.ProcContainer)
AddProcWatcher will add a watcher on proc.
func (*Watcher) RestartProc ¶
func (watcher *Watcher) RestartProc() chan process.ProcContainer
RestartProc is a wrapper to export the channel restartProc. It basically keeps track of all the processes that died and need to be restarted. Returns a channel with the dead processes that need to be restarted.
func (*Watcher) StopWatcher ¶
StopWatcher will stop a running watcher on a process with identifier 'identifier' Returns a channel that will be populated when the watcher is finally done.