filelock

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOwnerIdForProcess

func GetOwnerIdForProcess() string

func LockFile

func LockFile(lockPath string, ownerId string, timeoutSeconds int) (locked bool, err error)

func UnlockFile

func UnlockFile(lockPath string, ownerId string) (hadLock bool, err error)

Types

type FileLocker

type FileLocker interface {
	Lock(lockPath string, ownerId string, timeoutSeconds int) (locked bool, err error)
	Unlock(lockPath string, ownerId string) (hadLock bool, err error)
}

func NewFileLocker

func NewFileLocker() FileLocker

Jump to

Keyboard shortcuts

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