filelock

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: Apache-2.0 Imports: 5 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() (LockedFile, error)
}

func NewLocker added in v1.1.0

func NewLocker(path string) FileLocker

type LockedFile added in v1.1.0

type LockedFile interface {
	Close() error
	Read([]byte) (int, error)
	Truncate(int64) error
	Write([]byte) (int, error)
	Seek(int64, int) (int64, error)
}

type Locker

type Locker struct {
	FileLocker FileLocker
	Mutex      *sync.Mutex
	// contains filtered or unexported fields
}

func (*Locker) Lock added in v1.3.0

func (l *Locker) Lock() error

func (*Locker) Unlock added in v1.3.0

func (l *Locker) Unlock() error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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