Documentation
¶
Overview ¶
Package engineguard separates engine writer ordering from reader visibility.
Index ¶
- type Mutex
- func (m *Mutex) Lock()
- func (m *Mutex) LockState()
- func (m *Mutex) LockWriter()
- func (m *Mutex) RLock()
- func (m *Mutex) RLocker() sync.Locker
- func (m *Mutex) RUnlock()
- func (m *Mutex) Unlock()
- func (m *Mutex) UnlockState()
- func (m *Mutex) UnlockWriter()
- func (m *Mutex) WithReaders(fn func() error) error
- func (m *Mutex) WithWriters(fn func() error) error
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) Unlock ¶
func (m *Mutex) Unlock()
Unlock releases state, writer, and catalog 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 ¶
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 ¶
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.