daemon

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReloadSignalFile = "reload.signal"
	StopSignalFile   = "stop.signal"
	StatusSignalFile = "status.signal"
)

Signal file names for Windows IPC.

View Source
const PIDFileName = "hookrun.pid"

PIDFileName is the name of the PID file.

Variables

This section is empty.

Functions

func CheckSignalFile

func CheckSignalFile(signal string) bool

CheckSignalFile checks if a signal file exists and removes it. Returns true if the signal was found.

func GetHookRunDir

func GetHookRunDir() string

GetHookRunDir returns the HookRun data directory (~/.hookrun).

func GetStartTime

func GetStartTime(pid int) (time.Time, error)

GetStartTime reads the process start time.

func IsRunning

func IsRunning(pid int) bool

IsRunning checks if the process with the given PID is still running (Unix).

func ReadPID

func ReadPID() (int, error)

ReadPID reads the PID from the PID file.

func ReadStatus

func ReadStatus() (string, error)

ReadStatus reads the current status info.

func RemovePID

func RemovePID()

RemovePID removes the PID file.

func WritePID

func WritePID() error

WritePID writes the current process PID to the PID file.

func WriteSignalFile

func WriteSignalFile(signal string) error

WriteSignalFile creates a signal file for Windows IPC.

func WriteStatus

func WriteStatus(port int, ruleCount int) error

WriteStatus writes current status info for the status command to read.

Types

This section is empty.

Jump to

Keyboard shortcuts

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