flock

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker added in v0.0.41

type Locker interface {
	WithLock(cb func() error) error
}

func NewLocker added in v0.0.41

func NewLocker(lockFile string, options ...Option) Locker

type Option added in v0.0.41

type Option func(*Options)

type Options

type Options struct {
	RetryInterval time.Duration // RetryInterval how often to retry lock attempts
	Timeout       time.Duration // Timeout how long to wait for the lock before giving up
}

Options holds necessary attributes for a file lock with a timeout.

Jump to

Keyboard shortcuts

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