Documentation
¶
Overview ¶
Package api implements the AgentGraph REST API and web dashboard (PRD sections 60 and 29).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DashboardHandler ¶
DashboardHandler serves the embedded web dashboard and its vendored static assets (cytoscape, app.js) - no external CDN, works air-gapped.
Types ¶
type AlertHub ¶ added in v0.5.0
type AlertHub struct {
// contains filtered or unexported fields
}
AlertHub fans out runtime-detection alerts to SSE subscribers and keeps a bounded history for late joiners.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the REST API. Heavy analysis (path enumeration, blast radii) is computed once and cached; request handlers only read the cache. The remediation endpoint never mutates the served graph.
func NewServerWithAlerts ¶ added in v0.5.0
NewServerWithAlerts builds the server with a runtime-detection alert hub (enables the /api/v1/alerts endpoints).
func NewServerWithOptions ¶ added in v0.5.1
func NewServerWithOptions(opts ServerOptions) *Server
NewServerWithOptions builds a configured server.
type ServerOptions ¶ added in v0.5.1
type ServerOptions struct {
Graph *graph.Graph
// Hub is an optional alert hub enabling the /api/v1/alerts endpoints.
Hub *AlertHub
// Token enables bearer-token authentication when non-empty. Requests
// must present it via "Authorization: Bearer <token>" or "?token=".
Token string
}
ServerOptions configures the API server.