pidmonitor

package
v0.0.0-...-f54534b Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "pid-monitor"

Name s the base name of this task. When adding a new task, it'll be created as "pid-monitor-" + <pid>

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval string
	Pid      int
}

Config of this task

type PIDMonitor

type PIDMonitor struct {
	tasks.TaskBase

	Ticker   *time.Ticker
	Interval string
	Pid      int
	// contains filtered or unexported fields
}

PIDMonitor monitors a process ID.

func New

func New(pid int, interval string, stopOnDisconnect bool) (string, *PIDMonitor)

New returns a new PIDMonitor

func (*PIDMonitor) Errors

func (pm *PIDMonitor) Errors() <-chan error

Errors ...

func (*PIDMonitor) Pause

func (pm *PIDMonitor) Pause() error

Pause stops temporarily the task. For example it might be paused when the connection with the GUI (server) is closed.

func (*PIDMonitor) Results

func (pm *PIDMonitor) Results() <-chan interface{}

Results ...

func (*PIDMonitor) Resume

func (pm *PIDMonitor) Resume() error

Resume stopped tasks.

func (*PIDMonitor) Start

func (pm *PIDMonitor) Start(ctx context.Context, cancel context.CancelFunc) error

Start ...

func (*PIDMonitor) Stop

func (pm *PIDMonitor) Stop() error

Stop ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳