lockfile

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyLocked indicates the lock is held by another process.
	ErrAlreadyLocked = errors.New("lock already held")
)

Functions

func ReadContent

func ReadContent(path string) ([]byte, error)

Types

type Lock

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

func Acquire

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

func (*Lock) Path

func (l *Lock) Path() string

func (*Lock) Release

func (l *Lock) Release() error

func (*Lock) SetContent

func (l *Lock) SetContent(body []byte) error

Jump to

Keyboard shortcuts

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