lock

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package lock provides file-based mutual exclusion for single-instance enforcement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilePath added in v0.54.1

func FilePath(dir string) string

FilePath returns the lock file path for a given directory.

Types

type Locker

type Locker interface {
	Acquire(ctx context.Context) error
	Release(ctx context.Context) error
}

Locker provides exclusive access control to prevent concurrent dark-factory instances.

func NewLocker

func NewLocker(dir string) Locker

NewLocker creates a new Locker for the specified directory.

Jump to

Keyboard shortcuts

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