Versions in this module Expand all Collapse all v1 v1.21.61 Sep 9, 2026 v1.21.60 Sep 8, 2026 Changes in this version + type EnvironmentOptions struct + Keys []string + Prefixes []string + type Process struct + Active bool + CPUPercent float64 + CWD string + CWDError string + Command string + Environment map[string]string + EnvironmentError string + MemoryPercent float64 + PID int + PPID int + RSSBytes uint64 + StartedAt *time.Time + Status string + type ResourceUsage struct + CPUPercent float64 + MemoryPercent float64 + Processes []Process + RSSBytes uint64 + type Snapshot struct + func Discover(ctx context.Context, opts SnapshotOptions) (*Snapshot, error) + func NewSnapshot(processes []Process) *Snapshot + func (s *Snapshot) AggregateSubtree(pid int) ResourceUsage + func (s *Snapshot) All() []Process + func (s *Snapshot) Ancestors(pid int) []Process + func (s *Snapshot) Get(pid int) (Process, bool) + func (s *Snapshot) PopulateWorkingDirectories(ctx context.Context, pids []int) + func (s *Snapshot) Subtree(pid int) []Process + type SnapshotOptions struct + Environment *EnvironmentOptions