workspace

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package workspace provides workspace-level utilities including locking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

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

Lock represents an acquired workspace lock.

The lock used to install its own SIGINT handler that removed the lock file and called os.Exit(130). That is why an interrupt used to throw away the conversation: the process died before the turn could write down what it had done. Cleanup now happens on the normal exit path, and the interrupt is handled where the run context can be cancelled.

func AcquireLock

func AcquireLock(workspaceRoot string) (*Lock, error)

AcquireLock attempts to acquire an exclusive lock on a workspace directory. This prevents multiple kvit-coder instances from running on the same workspace simultaneously, which would cause checkpoint conflicts. Returns a Lock that must be released by calling Release(), or an error if lock fails.

func (*Lock) Release

func (l *Lock) Release()

Release releases the workspace lock and removes the lock file.

Jump to

Keyboard shortcuts

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