filelock

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLocker

type FileLocker interface {
	Open() (*os.File, error)
}

type Locker

type Locker struct {
	Path string
}

func (*Locker) Open

func (l *Locker) Open() (*os.File, error)

Open will open and lock a file. It blocks until the lock is acquired. If the file does not yet exist, it creates the file, and any missing directories above it in the path. To release the lock, Close the file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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