miniprocfs

package
v1.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package miniprocfs contains optimized small interface to access /proc filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processes

type Processes struct {
	RootPath string
	// contains filtered or unexported fields
}

Processes wraps iterative walker over processes under /proc.

func NewProcesses

func NewProcesses() (*Processes, error)

NewProcesses initializes process info iterator with path /proc.

func NewProcessesWithPath

func NewProcessesWithPath(rootPath string) (*Processes, error)

NewProcessesWithPath initializes process info iterator with non-default path.

func (*Processes) Close

func (procs *Processes) Close() error

Close the iterator.

func (*Processes) Next

func (procs *Processes) Next() (*machine.ProcessInfo, error)

Next returns process info until the list of processes is exhausted.

Next returns nil, nil when all processes were processed. Next skips processes which can't be analyzed.

Jump to

Keyboard shortcuts

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