Documentation
¶
Overview ¶
Package feedsync is the UT1 URL-category feed syncer: it periodically downloads the UT1 Capitole blacklist tarball (via the NethServer mirror), extracts the categories in the ingest map, and bulk-writes them into the community URL-category database (internal/catdb). Extracted from package main per ADR-0002; the feedSyncer singleton and the urlcategories startup slice stay in main (feedsync.go shim).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MappedCategories ¶
func MappedCategories() []string
MappedCategories returns the URLCategory values the UT1 ingest map produces (with duplicates — multiple UT1 directories can map to one category). Consumers: the category-store seeding at startup and the admin UI's feed-backed badge enrichment.
func SyncFailures ¶
func SyncFailures() int64
SyncFailures returns the cumulative UT1 sync failure count.
Types ¶
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer manages periodic synchronisation of UT1 data into the community DB.
func New ¶
New creates a Syncer for the given DB. feedURL defaults to defaultUT1FeedURL when empty. syncInterval defaults to 24h when zero.
func (*Syncer) SeedStats ¶
SeedStats sets the last-sync timestamp and domain count directly. Test support for the metrics surface (production values are set by Sync).
func (*Syncer) Start ¶
Start launches the background sync goroutine. An immediate sync is performed on first start when the DB is empty.