federation

package
v1.131.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package federation adapts the platform's live toolkit registry to the knowledge package's source interfaces, so the universal search router can federate API endpoints and connections without the knowledge engine depending on any concrete toolkit. It is the wiring seam between the running platform (registry, API gateway toolkits) and the decoupled knowledge.Provider set.

Keeping these adapters here rather than in pkg/platform also keeps that package within its structural size budget: the federation glue is cohesive enough to live on its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointSearchers

func EndpointSearchers(reg *registry.Registry) []knowledge.EndpointSearcher

EndpointSearchers adapts every operation-serving gateway toolkit registered in reg to knowledge.EndpointSearcher, so the search router can federate remote operations into its endpoints group. Both kinds that hold operations are here: the HTTP API gateway's OpenAPI endpoints and the graphql kind's schema operations. They share one group because they answer one question — which remote operation serves this intent — and a caller narrowing a search to "endpoints" should not have to know which kind their connection is.

Each adapter delegates to its toolkit's SearchOperations, which applies that toolkit's per-connection route policy, so the per-source access scope is enforced by the gateway itself.

Types

type ConnectionLister

type ConnectionLister struct {
	// contains filtered or unexported fields
}

ConnectionLister adapts the toolkit registry to knowledge.ConnectionLister, walking it the same way the list_connections tool does so the search corpus and that tool report the same set. It holds the registry (not a snapshot), so connections added later through the admin API remain searchable.

func NewConnectionLister

func NewConnectionLister(reg *registry.Registry) ConnectionLister

NewConnectionLister builds a connection lister over the toolkit registry.

func (ConnectionLister) Connections

func (l ConnectionLister) Connections() []knowledge.ConnectionInfo

Connections enumerates the deployment's configured connections as knowledge.ConnectionInfo records. Non-data toolkits (no ConnectionLister and not one of the fallback data kinds) are skipped.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL