util

package
v1.300061.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseExe

func BaseExe(exe string) string

func IsValidPort

func IsValidPort(port int) bool

func NewCachedProcess

func NewCachedProcess(p detector.Process) detector.Process

func TrimQuotes

func TrimQuotes(s string) string

Types

type CachedProcess

type CachedProcess struct {
	// contains filtered or unexported fields
}

CachedProcess provides a caching wrapper around the detector.Process. It caches the fields after their first retrieval.

func (*CachedProcess) CmdlineSliceWithContext

func (p *CachedProcess) CmdlineSliceWithContext(ctx context.Context) ([]string, error)

func (*CachedProcess) CreateTimeWithContext

func (p *CachedProcess) CreateTimeWithContext(ctx context.Context) (int64, error)

func (*CachedProcess) CwdWithContext

func (p *CachedProcess) CwdWithContext(ctx context.Context) (string, error)

func (*CachedProcess) EnvironWithContext

func (p *CachedProcess) EnvironWithContext(ctx context.Context) ([]string, error)

func (*CachedProcess) ExeWithContext

func (p *CachedProcess) ExeWithContext(ctx context.Context) (string, error)

func (*CachedProcess) PID

func (p *CachedProcess) PID() int32

type ProcessWithPID

type ProcessWithPID struct {
	*process.Process
}

ProcessWithPID provides a wrapper for the gopsutil process.Process to expose the PID.

func NewProcessWithPID

func NewProcessWithPID(process *process.Process) *ProcessWithPID

func (*ProcessWithPID) PID

func (p *ProcessWithPID) PID() int32

Jump to

Keyboard shortcuts

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