httpapi

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package httpapi hosts RiskKernel's HTTP surface: the public /v1 API, the OpenAI-compatible proxy, and the local admin/health endpoints. v0.1 starts with health and version; the proxy and /v1 run endpoints are layered on in later build steps against this same server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wires dependencies into an http.Handler. It holds no per-request state.

func New

func New(cfg *config.Config, gw *gateway.Gateway, mgr *runs.Manager, gate *approval.Gate,
	slack *approval.SlackNotifier, mcpGW *mcp.Gateway, mem *memory.Reader, ingress *otel.Ingress, log *slog.Logger) *Server

New constructs a Server.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the root HTTP handler with all routes mounted.

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, addr string) error

Serve runs the HTTP server on the given address until ctx is cancelled, then drains in-flight requests within a short grace period. This is how the kill switch and Ctrl-C reach a clean shutdown.

Jump to

Keyboard shortcuts

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