Documentation ¶
Overview ¶
Package server provides types for running an HTTP server with middleware.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // The port to serve HTTP traffic on. Port int // Individual controllers to register onto the server's http.Handler. Controllers []Controller // Middleware functions to invoke prior to request handlers. Middleware []Middleware // Enables debug endpoints for pprof. Debug bool }
The Config type contains configuration values used for running an HTTP server.
type Controller ¶
type Controller interface { // Register the Controller's endpoints onto the provided http.ServeMux. Register(m *http.ServeMux) }
The Controller interface describes types that register HTTP request handlers.
Click to show internal directories.
Click to hide internal directories.