filelock

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 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

func NewLocker(path string) FileLocker

type LockedFile

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

func (l *Locker) Lock() error

func (*Locker) Unlock

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