engineguard

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package engineguard separates engine writer ordering from reader visibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

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

Mutex serializes mutations while allowing readers during a writer's blocking I/O. The zero value is ready to use. Like sync.RWMutex, it must not be copied or locked recursively.

func (*Mutex) Lock

func (m *Mutex) Lock()

Lock acquires catalog ownership, then the writer gate and mutable state.

func (*Mutex) LockState

func (m *Mutex) LockState()

LockState excludes readers without joining the writer gate, for read-side cache updates. Only derived caches independent of staged admission and WAL state may change under this lock.

func (*Mutex) LockWriter

func (m *Mutex) LockWriter()

LockWriter orders ingestion and WAL operations without joining catalog publication.

func (*Mutex) RLock

func (m *Mutex) RLock()

RLock acquires a state snapshot without joining the writer gate.

func (*Mutex) RLocker

func (m *Mutex) RLocker() sync.Locker

RLocker returns the reader-facing lock.

func (*Mutex) RUnlock

func (m *Mutex) RUnlock()

RUnlock releases a state snapshot.

func (*Mutex) Revision added in v0.53.0

func (m *Mutex) Revision() (uint64, bool)

Revision returns a coherent publication version; exhaustion permanently disables reuse.

func (*Mutex) TryLockCatalog added in v0.51.0

func (m *Mutex) TryLockCatalog() bool

TryLockCatalog acquires metadata ownership without waiting for writer or state ownership. The caller must release it with Mutex.UnlockCatalog.

func (*Mutex) TryLockWriter added in v0.50.1

func (m *Mutex) TryLockWriter() bool

TryLockWriter acquires writer and state ownership if no other writer owns it; it may wait for readers.

func (*Mutex) Unlock

func (m *Mutex) Unlock()

Unlock releases state, writer, and catalog ownership.

func (*Mutex) UnlockCatalog added in v0.51.0

func (m *Mutex) UnlockCatalog()

UnlockCatalog releases metadata-only ownership.

func (*Mutex) UnlockState

func (m *Mutex) UnlockState()

UnlockState releases a read-side cache update.

func (*Mutex) UnlockWriter

func (m *Mutex) UnlockWriter()

UnlockWriter releases an ingestion or WAL operation.

func (*Mutex) WithReaders

func (m *Mutex) WithReaders(fn func() error) error

WithReaders temporarily admits readers while retaining exclusive writer ownership. The caller holds writer and state ownership; fn must not mutate reader-visible state or acquire this mutex.

func (*Mutex) WithWriters

func (m *Mutex) WithWriters(fn func() error) error

WithWriters admits ingestion and readers during catalog I/O, retaining catalog ownership. The caller holds Lock; fn must not mutate engine state or acquire this mutex.

Jump to

Keyboard shortcuts

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