Documentation
¶
Index ¶
- func FirstNonEmpty(str1, str2 string) string
- func GetBool(m map[string]any, key string, defaultValue bool) bool
- func GetString(m map[string]any, key string, defaultValue string) string
- func MapToEnvList(env map[string]string) []string
- func SendSignalToPIDFile(pidFile string, sig syscall.Signal) error
- func SplitByMultipleDelimiters(s string, delimiters ...string) []string
- type PIDManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstNonEmpty ¶
func MapToEnvList ¶
MapToEnvList converts a map to a slice of "key=value" strings.
func SendSignalToPIDFile ¶
SendSignalToPIDFile sends a signal to the process identified by the PID file
func SplitByMultipleDelimiters ¶ added in v0.8.2
Types ¶
type PIDManager ¶
type PIDManager struct {
// contains filtered or unexported fields
}
PIDManager handles PID file operations
func NewPIDManager ¶
func NewPIDManager(pidFile string) *PIDManager
NewPIDManager creates a new PIDManager instance
func NewPIDManagerFromConfig ¶
func NewPIDManagerFromConfig(pidFile string) *PIDManager
NewPIDManagerFromConfig creates a new PIDManager instance from config
func (*PIDManager) GetPIDFile ¶
func (p *PIDManager) GetPIDFile() string
GetPIDFile returns the PID file path
func (*PIDManager) RemovePID ¶
func (p *PIDManager) RemovePID() error
RemovePID removes the PID file
func (*PIDManager) WritePID ¶
func (p *PIDManager) WritePID() error
WritePID writes the current process ID to the PID file
Click to show internal directories.
Click to hide internal directories.