runlock

package
v0.10.257 Latest Latest
Warning

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

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

Documentation

Overview

Package runlock provides fail-fast advisory file locks for live review runs.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHeld means another process already holds the requested lock.
	ErrHeld = errors.New("runlock: lock held")
	// ErrUnsupported means the current platform has no runlock implementation.
	ErrUnsupported = errors.New("runlock: unsupported platform")
)

Functions

This section is empty.

Types

type Lock

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

Lock is a held advisory file lock.

func Acquire

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

Acquire creates path's parent directory and takes a non-blocking exclusive advisory lock on path.

func (*Lock) Release

func (l *Lock) Release() error

Release unlocks and closes the lock file. It is safe to call more than once.

Jump to

Keyboard shortcuts

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