Microservice framework following best cloud practices with a focus on productivity.
HTTP v2 tries to create a very thin layer around any http router provided by the end user.
Patron provides an implementation for the simple and excellent httprouter which is
available in the httprouter
available in Patron.
Because the HTTP component relies on the standard Go http.Handler
any implementation can be provided as long as the interface is implemented.
The component is responsible for running the HTTP server using the handler and terminating on request.
The component provides out of the box:
net/http/pprof
packageThe example folder contains various use cases.
The component create is then passed to the functional option of the Patron services, which replaces the default legacy HTTP handler with the new HTTP handler.
The implementation provides the following:
In the handler creation process are adding automatically to every route our standard middlewares that handle:
The router also provides functional options to configure certain aspects of its behavior like: