flock

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeoutExceeded = fmt.Errorf("timeout exceeded while trying to acquire lock")

Functions

func GetDefaultFlockCount

func GetDefaultFlockCount() int

func ShuffleLockFile

func ShuffleLockFile(dir string, count int) string

Types

type Flock

type Flock struct {
	// contains filtered or unexported fields
}

func New

func New(path string) *Flock

func (*Flock) Lock

func (f *Flock) Lock(dryRun bool) (func() error, error)

func (*Flock) WithRetryInterval

func (f *Flock) WithRetryInterval(retryInterval time.Duration) *Flock

func (*Flock) WithTimeout

func (f *Flock) WithTimeout(timeout time.Duration) *Flock

Jump to

Keyboard shortcuts

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