flocker

package
v0.0.0-...-0662ccb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_FILEINVALID       = errors.New("file invalid.")
	ERR_FileLocked        = errors.New("file locked.")
	ERR_FileLockExecption = errors.New("file lock execption.")
)

Functions

func LockFile

func LockFile(file *os.File, wait time.Duration) error

Types

type FileLocker

type FileLocker struct {
	FileName string
	Wait     time.Duration
	// contains filtered or unexported fields
}

func NewFileLocker

func NewFileLocker(fname string, wait time.Duration) *FileLocker

func (*FileLocker) Lock

func (lock *FileLocker) Lock() error

func (*FileLocker) Unlock

func (lock *FileLocker) Unlock()

Jump to

Keyboard shortcuts

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