datalock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package datalock marks a data directory as in use by a running coordinator, so offline operations such as restore can refuse to run.

Index

Constants

This section is empty.

Variables

View Source
var ErrLocked = errors.New("data directory is in use by a running coordinator")

ErrLocked means another process holds the lock.

Functions

This section is empty.

Types

type Lock

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

Lock is a held lock.

func Acquire

func Acquire(dir string) (*Lock, error)

Acquire takes the lock on dir without waiting.

func (*Lock) Release

func (l *Lock) Release() error

Release drops the lock.

Jump to

Keyboard shortcuts

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