utils

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstNonEmpty added in v0.5.1

func FirstNonEmpty(str1, str2 string) string

func MapToEnvList added in v0.4.0

func MapToEnvList(env map[string]string) []string

MapToEnvList converts a map to a slice of "key=value" strings.

func SendSignalToPIDFile added in v0.2.6

func SendSignalToPIDFile(pidFile string, sig syscall.Signal) error

SendSignalToPIDFile sends a signal to the process identified by the PID file

Types

type PIDManager added in v0.2.6

type PIDManager struct {
	// contains filtered or unexported fields
}

PIDManager handles PID file operations

func NewPIDManager added in v0.2.6

func NewPIDManager(pidFile string) *PIDManager

NewPIDManager creates a new PIDManager instance

func NewPIDManagerFromConfig added in v0.2.6

func NewPIDManagerFromConfig(pidFile string) *PIDManager

NewPIDManagerFromConfig creates a new PIDManager instance from config

func (*PIDManager) GetPIDFile added in v0.2.6

func (p *PIDManager) GetPIDFile() string

GetPIDFile returns the PID file path

func (*PIDManager) RemovePID added in v0.2.6

func (p *PIDManager) RemovePID() error

RemovePID removes the PID file

func (*PIDManager) WritePID added in v0.2.6

func (p *PIDManager) WritePID() error

WritePID writes the current process ID to the PID file

Jump to

Keyboard shortcuts

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