Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶ added in v0.2.2
Middleware helper type for handlers that receive a `Client`.
type Server ¶
type Server struct {
Client client.IFace
Router *mux.Router
// contains filtered or unexported fields
}
Server HTTP API for accessing `Features`
func NewDefault ¶
NewDefault creates a new `Server` using `config.hcl`.
func (*Server) FeaturesHandler ¶ added in v0.2.2
FeaturesHandler delegates to `handlers.FeaturesHandler` and adds the middleware chain.
func (*Server) RegisterRoutes ¶ added in v0.2.2
func (srv *Server) RegisterRoutes()
RegisterRoutes binds `Endpoint` to the `FeaturesHandler`.
func (*Server) ServeHTTP ¶ added in v0.2.2
func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP registers the `HTTPCachingHandler` and sets up the route handlers and logging.
func (*Server) Use ¶
func (srv *Server) Use(h ...Middleware)
Use appends `Middleware` to the internal chain.
Click to show internal directories.
Click to hide internal directories.