Documentation
¶
Overview ¶
Package main initializes the application and runs it using go1.8 features to stop it gracefully and allow connections to drain.
When it starts it logs it's hostname and what port it is listening on as well as the go version it was built with and the git commit and build time (if those were provided using ldflags). For example:
`$ go build -ldflags "-X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.commit=`git rev-parse HEAD` -w -s"`
Main uses a signal channel to listen for OS signals and will gracefully wait for connections to drain and then stop when it receives a signal to stop, or it will force a shutdown in 5 seconds.
It also has an error channel where it recieves errors from the http server and log them.
Directories
¶
Path | Synopsis |
---|---|
Package app contains our application and initialization function.
|
Package app contains our application and initialization function. |
Package handlers contains our route handlers.
|
Package handlers contains our route handlers. |
middleware
|
|
Package model contains our API models
|
Package model contains our API models |
Package routes contains our API routes.
|
Package routes contains our API routes. |