Documentation
¶
Overview ¶
Package gateway connects to Upstreams and serves their tools to an Agent as Namespaced tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway is a started set of Upstreams and the MCP server exposing their tools.
func Start ¶
func Start(ctx context.Context, configured []config.Upstream, env []string, startupTimeout time.Duration, version string, log *slog.Logger) *Gateway
Start launches every Upstream concurrently, collects their tools and returns a Gateway ready to serve them. env is the environment Upstream processes inherit. Each Upstream gets startupTimeout to connect and list its tools; one that fails or runs out of time is logged and left out.
func (*Gateway) Close ¶
func (g *Gateway) Close()
Close shuts every Upstream down at once, and waits for those still being stopped after failing to start.
Click to show internal directories.
Click to hide internal directories.