httpserver

package
v1.102.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Overview

Package httpserver assembles the platform's HTTP surface: the mux and route table (MCP streamable HTTP, SSE, OAuth, admin/portal/resources/gateway/ observability REST APIs, portal UI), CORS, and the drain/shutdown sequencing that lets connected agents reconnect to a new build. main.go owns flag parsing, config load, platform construction, signal handling, and the run/shutdown loop; it hands a fully-constructed platform to Serve.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, mcpServer *mcp.Server, p *platform.Platform, address string) error

Serve assembles the full HTTP mux (MCP streamable HTTP + SSE, OAuth, admin/ portal/resources/gateway/observability REST APIs, portal UI, health) and blocks serving it on address until ctx is canceled, then drains gracefully. Gateway/api-gateway integrations (broadcaster, token stores, catalog store, embed-job queue) and the admin self-connection are wired by p.WireRuntime in the caller, which runs before this HTTP setup. That keeps their ordering in one place (#854): the SSE long-poll path still gets the broadcaster wired into the gateway toolkit before the listener comes up at the end of this function, so AwareHandler never accepts a subscriber ahead of the wiring.

Types

This section is empty.

Jump to

Keyboard shortcuts

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