httpx

package
v0.0.0-...-83bddd0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package httpx is the HTTP surface: the dashboard, the health check and the MCP endpoint all hang off one mux so a number is served the same way whoever asks for it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New_

func New_(db *store.DB) (*mcp.Server, error)

New_ builds the MCP server for the HTTP endpoint. Named apart from New so the two constructors in this file cannot be confused at a glance.

Types

type Server

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

Server is the HTTP listener and its dependencies.

func New

func New(addr string, db *store.DB, log *slog.Logger, version string, dash *ui.App) *Server

New builds a Server bound to addr. dash may be nil, which serves the health endpoint alone; that is the shape the tests use.

func (*Server) Addr

func (s *Server) Addr() string

Addr is the configured listen address.

func (*Server) Serve

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

Serve listens until ctx is cancelled, then drains in-flight requests.

Jump to

Keyboard shortcuts

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