process

package
v0.0.0-...-277eb20 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivationPID

func ActivationPID(cfg Configurable) int32

ActivationPID returns the process ID of the activated state; if any

func ActivationPIDFileName

func ActivationPIDFileName(configpath string, n int) string

ActivationPIDFileName returns a consistent file path based on the given process id.

func IsActivated

func IsActivated(cfg Configurable) bool

IsActivated returns whether or not this process is being run in an activated state. This can be this specific process, or one of it's parents.

Types

type Activation

type Activation struct {
	PIDLock *lockfile.PidLock
}

Activation eases the use of a PidLock for the purpose of "marking" a process as being a valid "activation".

func NewActivation

func NewActivation(cfg Configurable, pid int) (*Activation, error)

NewActivation creates an instance of Activation.

func (*Activation) Close

func (a *Activation) Close() error

Close cleans up the used resources.

type Configurable

type Configurable interface {
	ConfigPath() string
}

Jump to

Keyboard shortcuts

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