Split Web into API/Dashboard, ping, metric and Rest Provider
This commit is contained in:
parent
384488ac02
commit
27d1b46835
24 changed files with 1252 additions and 377 deletions
21
ping/ping.go
Normal file
21
ping/ping.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package ping
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/containous/mux"
|
||||
)
|
||||
|
||||
//Handler expose ping routes
|
||||
type Handler struct {
|
||||
EntryPoint string `description:"Ping entryPoint" export:"true"`
|
||||
}
|
||||
|
||||
// AddRoutes add ping routes on a router
|
||||
func (g Handler) AddRoutes(router *mux.Router) {
|
||||
router.Methods("GET", "HEAD").Path("/ping").
|
||||
HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
|
||||
fmt.Fprint(response, "OK")
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue