cache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLock

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

FileLock provides exclusive file-based locking using flock.

func NewFileLock

func NewFileLock(path string) *FileLock

NewFileLock creates a new file lock for the given path. The lock file will be created if it doesn't exist.

func (*FileLock) Lock

func (l *FileLock) Lock() error

Lock acquires an exclusive lock on the file. Blocks until the lock is acquired.

func (*FileLock) Unlock

func (l *FileLock) Unlock() error

Unlock releases the lock and closes the file.

Jump to

Keyboard shortcuts

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