process

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDirEnvKey = "GOSIVY_CONFIG_DIR"

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

func GetPort

func GetPort(pid int) (string, error)

func PIDFile

func PIDFile(pid int) (string, error)

PIDFile gives back the path to pid file which the process port is written. Pid file is created when the agent is launched.

Types

type Process

type Process struct {
	PID        int
	Executable string
	// Full path to the executable.
	Path string
}

Process represents an OS process.

func FindOne

func FindOne() (*Process, error)

FindOne finds processes where the agent runs on and gives back the first one it found.

type Processes

type Processes []Process

func FindAll

func FindAll() (Processes, error)

FindAll gives back all processes where the agent runs on.

func (Processes) String

func (ps Processes) String() string

String formats as:

PID Exec Path 15788 foo /path/to/src/foo 14054 main /private/var/folders/sy/5rwqjr1j3kl5r3kwxfgntkfr0000gn/T/go-build227076651/b001/exe/main

Jump to

Keyboard shortcuts

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