projecttxn

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package projecttxn serializes mutations to project-scoped ToolHive state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(ctx context.Context, projectRoot string) (func(), error)

Lock acquires the bounded in-process stripe for projectRoot. Waiting is governed exclusively by ctx; callers without a deadline may wait until the current project mutation completes.

func LockPath

func LockPath(projectRoot string) (string, error)

LockPath returns the stable lock-file path for projectRoot's stripe.

func Run

func Run(ctx context.Context, projectRoot string, fn func() error) (err error)

Run executes fn while holding both the process-wide project stripe and the stable OS-backed lock shared by ToolHive processes. Lock files are retained after release because deleting one can split waiters across different inodes. Skills and AI plugins use this same transaction because both mutate toolhive.lock.yaml and related project bookkeeping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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