privateadmission

package
v0.120.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package privateadmission serializes local native journal writes with session SQLite mutations. It is admission ordering, never a cross-store transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Local

func Local(ctx context.Context, path string, fn func() error) error

Local serializes goroutines even when a legacy native owner reuses one flock object. The callback must additionally hold the matching cross-process flock.

func PhysicalDirectory

func PhysicalDirectory(path string) (string, error)

PhysicalDirectory refuses alternate physical spellings of the same directory on case-insensitive or normalization-insensitive filesystems. Existing native journal hashes retain their canonical pathname; aliases cannot create a second admission lock or silently move previously accepted work to another store.

func ProjectPath

func ProjectPath(projectDir, privateBase string) (string, error)

ProjectPath uses exactly the native Detective store's physical checkout identity, independent of its logical project alias and the session DB name. Both resolved directories must exist and be disjoint. Private path ownership and the project's served logical identity are verified by their caller.

func With

func With(ctx context.Context, path string, fn func() error) error

With holds a goroutine permit and a fresh cross-process flock descriptor. Calls must not nest, including via a wrapped session Transact. Source queries must run outside admission so Stop can persist its fence promptly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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