package monitor import "sync" // ConflictTracker counts sync conflicts across all folders. type ConflictTracker struct { mu sync.Mutex count int } // NewConflictTracker creates a new conflict tracker. func NewConflictTracker() *ConflictTracker { return &ConflictTracker{} } // SetCount updates the total conflict count. func (ct *ConflictTracker) SetCount(n int) { ct.mu.Lock() defer ct.mu.Unlock() ct.count = n } // Increment adds to the conflict count. func (ct *ConflictTracker) Increment() { ct.mu.Lock() defer ct.mu.Unlock() ct.count++ } // Count returns the current conflict count. func (ct *ConflictTracker) Count() int { ct.mu.Lock() defer ct.mu.Unlock() return ct.count }