Documentation
¶
Index ¶
Constants ¶
View Source
const ( SyncInterval = 1 * time.Hour SyncCooldown = 30 * time.Minute SyncConcurrency = 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncService ¶
type SyncService struct {
// contains filtered or unexported fields
}
func NewSyncService ¶
func NewSyncService(store *storage.Storage, feedFetcher fetch.FeedFetcher, pageFetcher fetch.PageFetcher) *SyncService
func (*SyncService) SyncAllBlogs ¶
func (s *SyncService) SyncAllBlogs() error
Start with the current time and a list of all known blogs. For each blog, compare its syncedAt time to the current time. If the difference is less than SyncCooldown, skip it. Otherwise, check for and sync new content.
func (*SyncService) SyncBlog ¶
func (s *SyncService) SyncBlog(feedURL string) error
Click to show internal directories.
Click to hide internal directories.