Documentation
¶
Index ¶
- func BaseExe(exe string) string
- func IsValidPort(port int) bool
- func NewCachedProcess(p detector.Process) detector.Process
- func TrimQuotes(s string) string
- type CachedProcess
- func (p *CachedProcess) CmdlineSliceWithContext(ctx context.Context) ([]string, error)
- func (p *CachedProcess) CreateTimeWithContext(ctx context.Context) (int64, error)
- func (p *CachedProcess) CwdWithContext(ctx context.Context) (string, error)
- func (p *CachedProcess) EnvironWithContext(ctx context.Context) ([]string, error)
- func (p *CachedProcess) ExeWithContext(ctx context.Context) (string, error)
- func (p *CachedProcess) PID() int32
- type ProcessWithPID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPort ¶
func TrimQuotes ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.