{"modulePath":"github.com/txn2/mcp-data-platform","version":"v1.173.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package catalogwire\n\nPackage catalogwire assembles the platform catalog's scan (#1918) from the running platform: the catalog store, the scan's settings, a source for each kind of connection read through its live toolkits, and the loop that runs the scan on its interval. The composition root starts it once the toolkits are wired and stops it when the server drains.\n\n## Functions\n\n```go\nfunc Connections(reg *registry.Registry) []catalogapi.Connection\n```\nConnections lists the live connections the catalog holds datasets for, by kind and instance, the names a catalog reference carries.\n\n```go\nfunc PortalRegistrar(p *platform.Platform, store catalog.Store, resolver portal.PersonaResolver, isAdmin func([]string) bool) func(*http.ServeMux)\n```\nPortalRegistrar returns the route registrar for the portal catalog (#1921).\n\n```go\nfunc RegistrationStore(p Platform, inner tableregister.Store) tableregister.Store\n```\nRegistrationStore wraps a registration store so each table it records is cataloged when it is recorded. With no database it returns inner.\n\n## Types\n\n```go\ntype Catalog struct {\n\tSettings *catalogscan.Store\n\tLoop     *catalogscan.Loop\n\t// Documents holds the schema documents the scan keeps (#1918).\n\tDocuments *catalogstore.Store\n\t// Import carries a DataHub into the catalog (#1923): once on upgrade,\n\t// after a scan, from the DataHub the configuration names (#2124), and\n\t// whenever an administrator starts it.\n\tImport *catalogimport.Runner\n\t// contains filtered or unexported fields\n}\n```\nCatalog is the assembled scan, and the DataHub import beside it.\n\n```go\nfunc Build(p *platform.Platform) *Catalog\n```\nBuild assembles the scan, or returns nil with no platform or no database.\n\n```go\nfunc (c *Catalog) MountAdmin(\n\tmux *http.ServeMux, auth func(*platform.Platform) func(http.Handler) http.Handler, author func(*http.Request) string,\n)\n```\nMountAdmin mounts the scan's settings and scan routes behind the admin API's authentication, when the admin API is enabled.\n\n```go\nfunc (c *Catalog) Start(ctx context.Context)\n```\nStart begins scanning.\n\n```go\nfunc (c *Catalog) Stop()\n```\nStop ends scanning and any import under way.\n\n```go\ntype Labeler struct {\n\tStore catalog.Store\n}\n```\nLabeler names the catalog definitions a knowledge page cites.\n\n```go\nfunc (l Labeler) Labels(ctx context.Context, refs []string) map[string]string\n```\nLabels reads the name of each definition reference; a reference that names no definition, or is not one, is left out.\n\n```go\ntype Platform interface {\n\tDB() *sql.DB\n\tToolkitRegistry() *registry.Registry\n}\n```\nPlatform is what the scan is assembled from.\n\n","path":"github.com/txn2/mcp-data-platform/internal/httpserver/catalogwire","name":"catalogwire","synopsis":"Package catalogwire assembles the platform catalog's scan (#1918) from the running platform: the catalog store, the scan's settings, a source for each kind of connection read through its live toolkits, and the loop that runs the scan on its interval.","isRedistributable":true}
