keyupdate

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

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

Guard holds a locked update stripe. It is returned by value so callers can preserve defer-based panic safety without allocating an unlock closure.

func (Guard) Unlock

func (g Guard) Unlock()

Unlock releases the stripe held by g. The zero value is a no-op guard.

type Locks

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

Locks coordinates single-key read-modify-write operations. The zero value is ready for use.

func (*Locks) Lock

func (l *Locks) Lock(key []byte) Guard

Lock locks the stripe for key and returns a guard that unlocks it. Hash collisions only reduce concurrency; they do not affect correctness.

Jump to

Keyboard shortcuts

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