Documentation
¶
Index ¶
- type ProcManager
- func (pm *ProcManager) DeleteAllProcesses()
- func (pm *ProcManager) DeleteProcess(title string) error
- func (pm *ProcManager) GetProcess(title string) (*Process, error)
- func (pm *ProcManager) GetProcessLogs(title string) (string, error)
- func (pm *ProcManager) GetProcesses() []*Process
- func (pm *ProcManager) StartProcess(title string, command string) *Process
- func (pm *ProcManager) StopAllProcesses()
- func (pm *ProcManager) StopProcess(title string) error
- type ProcStatus
- type Process
- type ProcessSearchFilter
- type ProcessSearchPredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcManager ¶
type ProcManager struct {
// contains filtered or unexported fields
}
func NewProcManager ¶
func NewProcManager(db *sqlx.DB) *ProcManager
func (*ProcManager) DeleteAllProcesses ¶
func (pm *ProcManager) DeleteAllProcesses()
func (*ProcManager) DeleteProcess ¶
func (pm *ProcManager) DeleteProcess(title string) error
func (*ProcManager) GetProcess ¶
func (pm *ProcManager) GetProcess(title string) (*Process, error)
func (*ProcManager) GetProcessLogs ¶
func (pm *ProcManager) GetProcessLogs(title string) (string, error)
func (*ProcManager) GetProcesses ¶
func (pm *ProcManager) GetProcesses() []*Process
func (*ProcManager) StartProcess ¶
func (pm *ProcManager) StartProcess(title string, command string) *Process
func (*ProcManager) StopAllProcesses ¶
func (pm *ProcManager) StopAllProcesses()
func (*ProcManager) StopProcess ¶
func (pm *ProcManager) StopProcess(title string) error
type ProcStatus ¶
type ProcStatus int
const ( Stoped ProcStatus = iota Active )
func (ProcStatus) String ¶
func (ps ProcStatus) String() string
type Process ¶
type Process struct {
Title string `db:"title"`
PID int `db:"pid"`
LogFile string `db:"log_file"`
Status ProcStatus `db:"status"`
Command string `db:"command"`
}
type ProcessSearchFilter ¶
type ProcessSearchFilter struct{}
func (ProcessSearchFilter) ByPID ¶
func (f ProcessSearchFilter) ByPID(pid int) ProcessSearchPredicate
func (ProcessSearchFilter) ByTitle ¶
func (f ProcessSearchFilter) ByTitle(title string) ProcessSearchPredicate
type ProcessSearchPredicate ¶
Click to show internal directories.
Click to hide internal directories.