pidlock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages the PID file and lock file to ensure a single instance runs.

func New

func New(runDir string) *Manager

New creates a Manager for the given run directory.

func (*Manager) Acquire

func (m *Manager) Acquire() error

Acquire tries to acquire the instance lock and write the current PID.

func (*Manager) Release

func (m *Manager) Release() error

Release removes the PID file and releases the lock.

Jump to

Keyboard shortcuts

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