Documentation
¶
Index ¶
- type Detector
- func (d *Detector) AddInstance(instanceID, worktreePath string) error
- func (d *Detector) ClearOldModifications(maxAge time.Duration)
- func (d *Detector) ConflictCount() int
- func (d *Detector) GetConflicts() []FileConflict
- func (d *Detector) GetFilesModifiedByInstance(instanceID string) []string
- func (d *Detector) HasConflicts() bool
- func (d *Detector) RemoveInstance(instanceID string)
- func (d *Detector) SetConflictCallback(cb func([]FileConflict))
- func (d *Detector) Start()
- func (d *Detector) Stop()
- type FileConflict
- type InstanceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector watches for file modifications across instances and detects conflicts
func (*Detector) AddInstance ¶
AddInstance starts watching files for an instance's worktree
func (*Detector) ClearOldModifications ¶
ClearOldModifications removes modifications older than the given duration
func (*Detector) ConflictCount ¶
ConflictCount returns the number of files with conflicts
func (*Detector) GetConflicts ¶
func (d *Detector) GetConflicts() []FileConflict
GetConflicts returns the current list of conflicts
func (*Detector) GetFilesModifiedByInstance ¶
GetFilesModifiedByInstance returns files modified by a specific instance
func (*Detector) HasConflicts ¶
HasConflicts returns true if there are any active conflicts
func (*Detector) RemoveInstance ¶
RemoveInstance stops watching an instance's worktree
func (*Detector) SetConflictCallback ¶
func (d *Detector) SetConflictCallback(cb func([]FileConflict))
SetConflictCallback sets the callback for when conflicts are detected
type FileConflict ¶
type FileConflict struct {
RelativePath string // Path relative to worktree root
Instances []string // Instance IDs that modified this file
LastModified time.Time // When the conflict was last detected
}
FileConflict represents a file being modified by multiple instances
type InstanceInfo ¶
InstanceInfo holds info about a watched instance