Create one syncer for each collection #177

Open
opened 2026-11-08 10:43:14 +00:00 by aniram · 1 comment
Owner

Currently we have one big struct called sync.Syncer and it contains both a pointer to db and a syncState repo. Every time a new collection needs to be synced this syncer gets bigger because it gets new methods although this new collection could have each own small and contained syncer, it does need access to syncState's repo. For this to work the sync.Syncer methods like expBackoff and saveEtag need to be exported so they can be used outside of this package.

Currently we have one big struct called sync.Syncer and it contains both a pointer to db and a syncState repo. Every time a new collection needs to be synced this syncer gets bigger because it gets new methods although this new collection could have each own small and contained syncer, it does need access to syncState's repo. For this to work the sync.Syncer methods like expBackoff and saveEtag need to be exported so they can be used outside of this package.
Author
Owner

While I'm at it, is everything being logged correctly?

While I'm at it, is everything being logged correctly?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
overdrives/chambersbr#177
No description provided.