Files
mesh-catalog/modules/mesh-config/cmd/mesh-config/catalogfeed.go
T

25 lines
1.3 KiB
Go

package main
// mesh-config's reading of each module's declarations (design 47 G §196, §594, §614): the catalog
// half, taken through meshcatalogclient's follower of the watched branches on the part's one views reader. A module's
// manifest is the one its catalog graph entry carries whole (§443), never the indexer's state `modules` or `manifests`; the
// manifest a running build was made from is the entry read by that build's fingerprint (§614, an older build's entry).
import (
"context"
"git.novox.be/novox/mesh-delivery/contracts/go/clients/meshcatalogclient"
catalog "git.novox.be/novox/mesh-delivery/contracts/go/seats/meshcatalog"
)
// CatalogHalf is what the holder reads of the catalog half.
type CatalogHalf interface {
// Entry is a module's entry at the trunk; an error while a watched branch has no first view yet, never "no module".
Entry(module string) (catalog.CatalogEntry, bool, error)
// Ready is nil once every watched branch has its first view (none-yet counting as one), else says what it waits for.
Ready() error
// Resolve reads an entry by the fingerprint of a build: from a branch's half when one lists it, else asked of the
// seat's verb `entry` once and kept (asked, answered or not found).
Resolve(ctx context.Context, fingerprint string) (catalog.CatalogEntry, meshcatalogclient.EntryState)
}