lock

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package lock coordinates cooperative access to local storage files.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContended = errors.New("database lock is held")
	ErrMissing   = errors.New("database lock is missing")
)

Functions

This section is empty.

Types

type Handle

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

func AcquireExclusive

func AcquireExclusive(path string) (*Handle, error)

func AcquireExclusiveExisting

func AcquireExclusiveExisting(path string) (*Handle, error)

func AcquireShared

func AcquireShared(path string) (*Handle, error)

func AcquireSharedCreate

func AcquireSharedCreate(path string) (*Handle, error)

func (*Handle) Close

func (h *Handle) Close() error

Jump to

Keyboard shortcuts

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