Documentation
¶
Overview ¶
Package commons provides shared command-line process helpers.
Index ¶
- func PrintVersion(command *cobra.Command) error
- func ProcessCommonFlags(command *cobra.Command) (*commons.Config, error)
- func ProcessRunning(pid int) bool
- func ReadPID(path string) (int, error)
- func SetCommonFlags(command *cobra.Command)
- func SignalPID(pid int, signal syscall.Signal) error
- type PIDFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintVersion ¶
func ProcessRunning ¶
ProcessRunning reports whether a process exists or cannot be inspected due to insufficient permission.
func SetCommonFlags ¶
Types ¶
type PIDFile ¶
type PIDFile struct {
// contains filtered or unexported fields
}
PIDFile holds an exclusive lock on a process ID file.
func AcquirePIDFile ¶
AcquirePIDFile creates and exclusively locks a PID file for this process.
Click to show internal directories.
Click to hide internal directories.