process

package
v1.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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"`
}

func (*Process) GetLogs

func (p *Process) GetLogs() string

func (*Process) IsAlive

func (p *Process) IsAlive() bool

func (*Process) Restart

func (p *Process) Restart()

func (*Process) Stop

func (p *Process) Stop()

type ProcessSearchFilter

type ProcessSearchFilter struct{}

func (ProcessSearchFilter) ByPID

func (ProcessSearchFilter) ByTitle

type ProcessSearchPredicate

type ProcessSearchPredicate func(p *Process) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL