flock

package
v0.0.0-...-32b710e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close is equivalent to calling Unlock.

This will release the lock and close the underlying file descriptor. It will not remove the file from disk, that's up to your application.

func Lock

func Lock(lockfile string) error

Lock : Lock

func RLock

func RLock(lockfile string) error

RLock : read lock

func TryLock

func TryLock(lockfile string) (bool, error)

TryLock : try lock

func TryRLock

func TryRLock(lockfile string) (bool, error)

TryRLock : try read lock

func Unlock

func Unlock() error

Unlock : unlock

Types

This section is empty.

Jump to

Keyboard shortcuts

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