Documentation
¶
Overview ¶
Package server is the HTTP composition root for the serve command: it builds the root mux, wraps it in the access log, and mounts the route sets that live in their own packages — the JSON API (internal/api) under /api/, and the HTML web UI (internal/web, serving its own /static/ assets) at /. The health endpoints are its own, since serving lifecycle is not a web or API concern.
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 holds the dependencies shared by every mounted route set.
func New ¶
func New( db *store.Store, cfg *config.Config, addr, cfgPath string, ing *ingest.Manager, log zerolog.Logger, ) *Server
New returns a Server backed by db, using cfg for request defaults. addr is the bound listen address, forwarded to the web UI for display only. cfgPath is the loaded config's path, shown read-only by the web UI's config viewer. ing owns the in-process ingest runs the web UI triggers. log backs the access log.