mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 04:42:36 +02:00
Integrated Fantastic coffie (decaffeinated) base version
This commit is contained in:
parent
2fc5535f0f
commit
94036c4831
482 changed files with 476112 additions and 0 deletions
16
service/api/liveness.go
Normal file
16
service/api/liveness.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// liveness is an HTTP handler that checks the API server status. If the server cannot serve requests (e.g., some
|
||||
// resources are not ready), this should reply with HTTP Status 500. Otherwise, with HTTP Status 200
|
||||
func (rt *_router) liveness(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
/* Example of liveness check:
|
||||
if err := rt.DB.Ping(); err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue