Documentation
¶
Overview ¶
Package assembly builds a check and the list of its sources from the lists the configuration turns on, the snapshots in service and the registries: the one assembly every command shares, so that none of them consults fewer sources than another without saying so.
Index ¶
- func Backup(ctx context.Context, cfg config.Config) (*app.Backup, func(), error)
- func Lists(opts catalog.Options, snaps listing.Snapshots, regs app.Registries) (app.Registries, error)
- func SnapshotStore(cfg config.Config) (app.SnapshotStore, error)
- func Sync(opts catalog.Options, st app.SnapshotStore) (*app.Sync, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Backup ¶ added in v0.57.0
Backup returns the backup of the key store of cfg, sealed for its recipient and kept in its bucket, and the function that closes its database pool. Nothing connects until a backup runs.
func Lists ¶
func Lists(opts catalog.Options, snaps listing.Snapshots, regs app.Registries) (app.Registries, error)
Lists returns regs with the lists a check reads, each from the snapshot of its source in snaps: the blacklists opts turns on, the white lists, which leave out the shipped hosting platforms, and the numbering plan, and the shipped list of official domains. The registries of regs are kept. A shipped list that does not load is an error.
func SnapshotStore ¶ added in v0.50.0
func SnapshotStore(cfg config.Config) (app.SnapshotStore, error)
SnapshotStore returns where the snapshots of cfg are stored: its bucket when it is enabled, in production (ADR 0005), else the directory cfg.SnapshotDir, created if missing. The sync and API processes share it.
Types ¶
type Service ¶
Service is what a process answers with: the snapshots in service, the check that reads them and the list of the sources it consults.
func Live ¶
func Live(opts catalog.Options, st app.SnapshotStore, checkOpts ...app.CheckOption) (Service, error)
Live returns the service of the lists opts turns on, their snapshots read from st, and of the live registries, each check configured by checkOpts. Nothing is fetched until a check asks.
func New ¶
func New(opts catalog.Options, st app.SnapshotStore, regs app.Registries, checkOpts ...app.CheckOption) (Service, error)
New returns the service of the lists opts turns on, their snapshots read from st, and of the registries of regs, each check configured by checkOpts. Nothing is restored: the caller restores Service.Sync.