process

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRefCountFile

func GetRefCountFile() string

GetRefCountFile returns the path to the refcount file

Types

type RefCountManager

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

RefCountManager manages filesystem-based reference counting for concurrent ccl sessions. This tracks how many ccl CLI instances are currently running.

func NewRefCountManager

func NewRefCountManager() *RefCountManager

NewRefCountManager creates a new reference count manager with default paths

func NewRefCountManagerWithPaths

func NewRefCountManagerWithPaths(homeDir, refCountFile string) *RefCountManager

NewRefCountManagerWithPaths creates a reference count manager with custom paths (for testing)

func (*RefCountManager) DecrementRefCount

func (m *RefCountManager) DecrementRefCount() (int, error)

DecrementRefCount decrements the session reference count Call this when a CLI command exits Returns the new count

func (*RefCountManager) GetRefCount

func (m *RefCountManager) GetRefCount() (int, error)

GetRefCount returns the current reference count

func (*RefCountManager) IncrementRefCount

func (m *RefCountManager) IncrementRefCount() error

IncrementRefCount increments the session reference count Call this when a CLI command starts

func (*RefCountManager) RefCountFile

func (m *RefCountManager) RefCountFile() string

RefCountFile returns the path to the refcount file for this manager instance

func (*RefCountManager) ResetRefCount

func (m *RefCountManager) ResetRefCount() error

ResetRefCount resets the reference count to 0 Use this for manual cleanup of leaked references

Jump to

Keyboard shortcuts

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