dirlock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dirlock coordinates cooperating processes with an exclusive directory. It does not recover stale locks: callers must establish that the prior owner has stopped before removing one. All participants must use the same path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Acquire

func Acquire(path string) (func() error, error)

Acquire creates path exclusively, creating its parent directories if needed. It fails immediately on contention. The returned release is idempotent and refuses to remove a directory whose identity changed since acquisition. A process crash leaves the directory in place; no age-based expiry is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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