package flock
import "sigs.k8s.io/controller-runtime/pkg/internal/flock"
Package flock is copied from k8s.io/kubernetes/pkg/util/flock to avoid importing k8s.io/kubernetes as a dependency.
Provides file locking functionalities on unix systems.
Index ¶
Variables ¶
var ( // ErrAlreadyLocked is returned when the file is already locked. ErrAlreadyLocked = errors.New("the file is already locked") )
Functions ¶
func Acquire ¶
Acquire acquires a lock on a file for the duration of the process. This method is reentrant.
Source Files ¶
doc.go errors.go flock_unix.go
- Version
- v0.20.4 (latest)
- Published
- Mar 24, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 days ago –
Tools for package owners.