filelock

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package filelock provides process-scoped shared/exclusive cache leases.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("file locking unsupported on this OS")

Functions

func Acquire

func Acquire(ctx context.Context, path string, exclusive bool) (*os.File, error)

func IsBusy

func IsBusy(err error) bool

IsBusy reports contention with another process-held lease.

func Try

func Try(path string) (*os.File, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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