lockfile

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLocked indicates the lock is already held by another process.
	ErrLocked = errors.New("lock already held")
	// ErrUnsupported indicates file locking is not supported on this platform.
	ErrUnsupported = errors.New("file locking unsupported")
)

Functions

This section is empty.

Types

type Lock

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

func Acquire

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

func AcquireShared

func AcquireShared(path string) (*Lock, error)

AcquireShared attempts to take a shared (read) lock on an existing lock file. It never creates or writes to the lock file.

func (*Lock) Close

func (l *Lock) Close() error

Jump to

Keyboard shortcuts

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