added prometheus route
This commit is contained in:
parent
a0ca983b45
commit
abe0e155a9
2
main.go
2
main.go
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
//go:generate go-bindata -o static.go static/
|
||||
@ -24,6 +25,7 @@ var store = sessions.NewCookieStore([]byte(os.Getenv("MMG_SECRET_KEY")))
|
||||
func main() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
flag.Parse()
|
||||
http.Handle("/metrics", prometheus.Handler())
|
||||
http.HandleFunc("/api/v0/addsub/problem/", addsub)
|
||||
http.HandleFunc("/api/v0/mul/problem/", mul)
|
||||
http.HandleFunc("/api/v0/attempt/", attempt)
|
||||
|
Loading…
Reference in New Issue
Block a user