♻️ Refactor synchronization service

This commit is contained in:
2026-03-30 00:03:23 +08:00
parent 34c8f2a185
commit 4c5fff5390
42 changed files with 4377 additions and 3199 deletions

20
internal/syncer/types.go Normal file
View File

@@ -0,0 +1,20 @@
package syncer
// Logger 描述同步模块需要的最小日志接口。
type Logger interface {
Debug(message string, args ...interface{})
Info(message string, args ...interface{})
Warning(message string, args ...interface{})
Error(message string, args ...interface{})
}
// SyncResult 描述一次同步的结果。
type SyncResult struct {
TargetID string
LocalChanged bool
RemoteChanged bool
AppliedToLocal bool
Published bool
ConflictCount int
Revision string
}