lock

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLockedFile

type DefaultLockedFile struct {
	// contains filtered or unexported fields
}

func (*DefaultLockedFile) Close

func (e *DefaultLockedFile) Close() error

func (*DefaultLockedFile) Exclusive

func (e *DefaultLockedFile) Exclusive() bool

func (*DefaultLockedFile) File

func (e *DefaultLockedFile) File() *os.File

type LockedFile

type LockedFile interface {
	File() *os.File
	Exclusive() bool
	Close() error
}

func OpenExclusive

func OpenExclusive(path string, flag int, perm os.FileMode) (LockedFile, error)

func OpenShared

func OpenShared(path string, flag int, perm os.FileMode) (LockedFile, error)

Jump to

Keyboard shortcuts

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