filelock

package
v0.0.0-...-91a82d4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: LGPL-3.0 Imports: 4 Imported by: 1

Documentation

Overview

Package filelock provides portable file locking.

Package filelock provides portable file locking.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrDatadirUsed datadir already used by another process,datadir can only be accessed by a process.
	ErrDatadirUsed = errors.New("datadir already used by another process")
)

Functions

func CheckError

func CheckError(err error) error

CheckError check file lock err

Types

type Releaser

type Releaser interface {
	Release() error
}

Releaser provides the Release method to release a file lock.

func New

func New(fileName string) (r Releaser, existed bool, err error)

New locks the file with the provided name.

Jump to

Keyboard shortcuts

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