Documentation
¶
Overview ¶
Package detect is the scheduler's Checker: it fetches a target through the source registered for its kind and commits what it found (known set, held versions, events, deliveries) through event.Commit, the transactional outbox. It is the glue of detect -> normalize that the scheduler leaves out so as not to import the pipeline (scheduler.Checker).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// Store commits a check in one transaction; the SQLite store implements it.
Store event.Committer
// Sources lists the upstream versions of a target. Production passes a
// registry whose sources fetch through the netguard client.
Sources Sources
// Instance is instance.name, the <instance> of every event's source.
Instance string
// RegistryURL returns the configured base URL of a source (its name: a
// kind, or an instance) when it is not the public registry, otherwise ""
// (event.CheckInput.RegistryURL). Nil means "" for every source.
RegistryURL func(name string) string
// Matcher caches the compiled subscriptions across checks; nil loads
// them on every commit.
Matcher *event.MatcherCache
// Now stamps the check; nil means time.Now.
Now func() time.Time
Logger *slog.Logger
}
Checker implements scheduler.Checker. Its fields are read-only after the scheduler starts, so one Checker serves every worker.