package
Version:
v0.2.6
Opens a new window with list of versions in this module.
Published: Feb 15, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package filemu implements file-based mutexes.
type UnlockFunc func() error
UnlockFunc is the set of unlock functions.
func Lock(ctx context.Context, path string) (UnlockFunc, error)
Lock attempts to acquire an exclusive lock on the named file.
func RLock(ctx context.Context, path string) (UnlockFunc, error)
RLock attempts to acquire a shared lock on the named file.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.