filelock

package
v0.0.0-...-49a8380 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLocked = errors.New("specified lockfile is locked")

ErrLocked is returned from Lock if a Lock is called on an existing LockFile

Functions

This section is empty.

Types

type FileLock

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

FileLock is a handle to an on-disk file lock.

func Lock

func Lock(filename string) (*FileLock, error)

Lock attempts to acquire a lock on the file at `filename`. Returns an error if a lock has already been created.

func (*FileLock) Unlock

func (fl *FileLock) Unlock() error

Unlock unlocks the FileLock.

Jump to

Keyboard shortcuts

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