filelock

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package filelock provides an advisory, cross-process exclusive lock on a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(ctx context.Context, path string) (func(), error)

Lock opens (creating it 0600) path and takes an exclusive advisory lock on it, waiting until ctx is done. The returned function releases the lock; the file itself is left in place.

Types

This section is empty.

Jump to

Keyboard shortcuts

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