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