processinfo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandName

func CommandName(_ context.Context, _ int) (string, error)

CommandName returns the executable command name for pid when the platform exposes one through the local processinfo implementation.

func StartIdentity

func StartIdentity(_ context.Context, _ int) string

StartIdentity returns a stable process start identity for pid when the platform exposes one through the local processinfo implementation.

Types

type PermissionError

type PermissionError struct {
	Path string
	Err  error
}

PermissionError reports an inability to inspect a process table or entry.

func (*PermissionError) Error

func (e *PermissionError) Error() string

func (*PermissionError) Unwrap

func (e *PermissionError) Unwrap() error

type Process

type Process struct {
	PID                int
	PPID               int
	ProcessGroupID     int
	Foreground         bool
	StartIdentity      string
	Executable         string
	CWD                string
	TTY                string
	AgentHint          string
	MultiplexerKind    string
	MultiplexerServer  string
	MultiplexerSession string
	MultiplexerPane    string
	Args               []string `json:"-"`
}

Process is a point-in-time snapshot of a process. Args, AgentHint, and the multiplexer hints are transient inventory data and must not be persisted by callers.

func Find

func Find(_ context.Context, _ int) (Process, bool, error)

Find reports that this operating system has no supported process observer.

func List

func List(_ context.Context) ([]Process, error)

List reports that this operating system has no supported process observer.

type TableError

type TableError struct {
	Path string
	Err  error
}

TableError reports malformed or otherwise unusable process table data.

func (*TableError) Error

func (e *TableError) Error() string

func (*TableError) Unwrap

func (e *TableError) Unwrap() error

type UnsupportedError

type UnsupportedError struct {
	Platform string
}

UnsupportedError reports that process enumeration is unavailable on the current operating system.

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

Jump to

Keyboard shortcuts

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