Documentation
¶
Overview ¶
Package api hosts VORTEX's management HTTP server. In M1.2 this is just a health endpoint that reports liveness and the active config hash, so a reload can be verified externally (e.g. curl localhost:9090/health). It is built on net/http from the standard library (Non-Negotiable Rule #10).
Index ¶
Constants ¶
const DefaultAddr = ":9090"
DefaultAddr is the management server's default listen address.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the management HTTP server.
func New ¶
New constructs a management Server. holder supplies the live config so /health always reports the currently active hash, including after a reload.
func (*Server) SetReloadFunc ¶
SetReloadFunc registers the callback invoked by POST /internal/reload. It should re-read and re-validate the config and return an error if invalid.
func (*Server) SetShutdownFunc ¶
func (s *Server) SetShutdownFunc(fn func())
SetShutdownFunc registers the callback invoked by POST /internal/shutdown to begin a graceful shutdown.