agentproc

package
v2.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentproc contains logic for interfacing with local processes running in the same context as the agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	Dir         string
	CmdLine     string
	PID         int32
	OOMScoreAdj int
}

func List

func List(fs afero.Fs, syscaller Syscaller) ([]*Process, error)

func (*Process) Cmd

func (p *Process) Cmd() string

func (*Process) Niceness

func (p *Process) Niceness(sc Syscaller) (int, error)

func (*Process) SetNiceness

func (p *Process) SetNiceness(sc Syscaller, score int) error

type Syscaller

type Syscaller interface {
	SetPriority(pid int32, priority int) error
	GetPriority(pid int32) (int, error)
	Kill(pid int32, sig syscall.Signal) error
}

func NewSyscaller

func NewSyscaller() Syscaller

type UnixSyscaller

type UnixSyscaller struct{}

func (UnixSyscaller) GetPriority

func (UnixSyscaller) GetPriority(pid int32) (int, error)

func (UnixSyscaller) Kill

func (UnixSyscaller) Kill(pid int32, sig syscall.Signal) error

func (UnixSyscaller) SetPriority

func (UnixSyscaller) SetPriority(pid int32, nice int) error

Directories

Path Synopsis
Package agentproctest contains utility functions for testing process management in the agent.
Package agentproctest contains utility functions for testing process management in the agent.

Jump to

Keyboard shortcuts

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