process

package
v0.0.0-...-9853328 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	P_NEW = iota
	P_READY
	P_SUSPEND
	P_RUNNING
	P_WAIT
	P_STOPPED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CTID

type CTID int

func (CTID) IsSystem

func (CTID) IsSystem() bool

func (CTID) Value

func (id CTID) Value() int

type OSHandle

type OSHandle struct {
	// contains filtered or unexported fields
}

type OSNotify

type OSNotify struct {
	// contains filtered or unexported fields
}

func NewOSNotify

func NewOSNotify() *OSNotify

func (*OSNotify) AddFunc

func (n *OSNotify) AddFunc(paths []string, cmd func()) int

func (*OSNotify) Listen

func (n *OSNotify) Listen()

func (*OSNotify) Remove

func (n *OSNotify) Remove(id int)

type OSTID

type OSTID int

func (OSTID) IsSystem

func (OSTID) IsSystem() bool

func (OSTID) Value

func (id OSTID) Value() int

type Process

type Process struct {
	// contains filtered or unexported fields
}

func New

func New() *Process

func (*Process) Cmd

func (p *Process) Cmd() string

func (*Process) Pid

func (p *Process) Pid() int64

func (*Process) Run

func (p *Process) Run()

func (*Process) Spec

func (p *Process) Spec() string

func (*Process) State

func (p *Process) State() pstate

type ProcessManager

type ProcessManager struct {
	// contains filtered or unexported fields
}

func NewProcessManager

func NewProcessManager() *ProcessManager

func (*ProcessManager) CreateProcess

func (m *ProcessManager) CreateProcess(spec, cmd string) *Process

func (*ProcessManager) NextPID

func (m *ProcessManager) NextPID() int64

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler() *Scheduler

func (*Scheduler) CreateCronTask

func (s *Scheduler) CreateCronTask(cron, cmd string) (pid int64, err error)

func (*Scheduler) CreateFSListenTask

func (s *Scheduler) CreateFSListenTask(paths []string, cmd string) (int64, error)

func (*Scheduler) CreateImmediateCronTask

func (s *Scheduler) CreateImmediateCronTask(cron, cmd string) (pid int64, err error)

func (*Scheduler) CreateTimingImmediateCronTask

func (s *Scheduler) CreateTimingImmediateCronTask(cron, cmd string)

func (*Scheduler) FindByCmd

func (s *Scheduler) FindByCmd(cmd string) (ret []*Process)

func (*Scheduler) FindByPID

func (s *Scheduler) FindByPID(pid int64) *Process

func (*Scheduler) Kill

func (s *Scheduler) Kill(pid int64)

func (*Scheduler) ProcessState

func (s *Scheduler) ProcessState() map[int64]*Process

func (*Scheduler) Run

func (s *Scheduler) Run()

type TID

type TID interface {
	IsSystem() bool
	Value() int
}

Jump to

Keyboard shortcuts

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