Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceID ¶
GetTraceID returns the trace id from the context.
Types ¶
type App ¶
type App struct { *httptreemux.ContextMux // contains filtered or unexported fields }
App is the entrypoint into out application and what configures our context object for each of out http handlers. Feel free to add any configuration data/logic on this App struct.
func NewApp ¶
func NewApp(shutdown chan os.Signal, mw ...Middleware) *App
NewApp creates an App value that handles a set of routes for the application.
func (*App) Handle ¶
func (a *App) Handle(method, group, path string, handler Handler, mw ...Middleware)
Handle sets a handler function for a given HTTP method and path pair to the application server mux.
func (*App) SignalShutdown ¶
func (a *App) SignalShutdown()
SignalShutdown is used to gracefully shut down the app when an integrity issue is identified.
type Handler ¶
Handler is a type that handles a http request within out own little mux mini framework.
type Middleware ¶
Middleware is a function designed to run some code before and/or after another Handler. It is designed to remove boilerplate or other concerns not direct to any given Handler.