Documentation
¶
Overview ¶
Package zipapp is the single way DocDB builds and runs an HTTP router.
Every DocDB listener (Data API, MCP, debug) declares its routes on a zip.App built by New and serves it on an already-bound net.Listener with Serve. Routing errors are rendered exactly as net/http.ServeMux renders them, so routes keep the status codes and bodies they had before the router moved to zip.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseContext ¶
BaseContext returns the middleware that makes ctx the parent of every request's context, the way http.Server.BaseContext did: a handler's context carries the listener's values and is canceled when the listener stops.
It must be the first middleware an app uses, so that everything downstream derives from it.
func New ¶
New returns an app named name with no routes.
The app is silent: DocDB logs listener lifecycle itself via Serve, and zip's own logger would duplicate it in a different format.
Types ¶
This section is empty.