projecttxn

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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 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