httpserver

package
v1.117.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 56 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.

Directories

Path Synopsis
Package accessgate refuses portal requests from callers whose roles map to no persona.
Package accessgate refuses portal requests from callers whose roles map to no persona.
Package attachhttp exposes prompt resource attachments (#1013) over REST for both operator surfaces: the portal (a prompt author manages the materials on their own prompts) and the admin API (any prompt).
Package attachhttp exposes prompt resource attachments (#1013) over REST for both operator surfaces: the portal (a prompt author manages the materials on their own prompts) and the admin API (any prompt).
Package datahubapi serves the portal's DataHub Catalog and Context Docs REST surface (#718): browse/search/read over DataHub connections plus catalog metadata edits and context-document CRUD, gated per-persona.
Package datahubapi serves the portal's DataHub Catalog and Context Docs REST surface (#718): browse/search/read over DataHub connections plus catalog metadata edits and context-document CRUD, gated per-persona.
Package gatewayhttp exposes the apigateway toolkit's invoke operation over plain REST so non-MCP HTTP clients (e.g.
Package gatewayhttp exposes the apigateway toolkit's invoke operation over plain REST so non-MCP HTTP clients (e.g.
Package health provides readiness state tracking and HTTP health check handlers.
Package health provides readiness state tracking and HTTP health check handlers.
Package httpauth is the HTTP-level authentication gate for the MCP transports: it extracts a bearer token or API key from the request, authenticates it, and refuses an unauthenticated caller with the challenge the transport expects before any MCP framing is parsed.
Package httpauth is the HTTP-level authentication gate for the MCP transports: it extracts a bearer token or API key from the request, authenticates it, and refuses an unauthenticated caller with the challenge the transport expects before any MCP framing is parsed.
Package mentionhttp serves the people surfaces of the portal API: the known-users directory behind the share picker (#614), the audience-scoped candidate list behind the @-mention picker, and the caller's mentions inbox (#627).
Package mentionhttp serves the people surfaces of the portal API: the known-users directory behind the share picker (#614), the audience-scoped candidate list behind the @-mention picker, and the caller's mentions inbox (#627).
Package sources provides concrete enrichment Source adapters for the platform's built-in toolkits (Trino, DataHub).
Package sources provides concrete enrichment Source adapters for the platform's built-in toolkits (Trino, DataHub).
Package versionhttp exposes prompt version history, draft review actions, audit-derived usage stats (#1009), and prompt collection management (#1010) over REST.
Package versionhttp exposes prompt version history, draft review actions, audit-derived usage stats (#1009), and prompt collection management (#1010) over REST.

Jump to

Keyboard shortcuts

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