Skip to content
Snippets Groups Projects
Commit 5d55710e authored by Tucker Siegel's avatar Tucker Siegel
Browse files

update

parent c2ea3fcd
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ require (
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect
github.com/valyala/fasthttp v1.30.0
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211115003907-29847c0cb4fa // indirect
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211117000004-a01aae096d7c // indirect
go.mongodb.org/mongo-driver v1.7.3
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect
......
......@@ -652,6 +652,28 @@ gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211115003309-cc7f72ca57a7 h1:wqyO
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211115003309-cc7f72ca57a7/go.mod h1:uefL5Zy8/59SSG9FwwPEJVYH7/z6GImE8tYryHRyxH0=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211115003907-29847c0cb4fa h1:kN6XnD42D65M2EERt3zLdgDBsWj3e6a2c/96R9Inr0Q=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211115003907-29847c0cb4fa/go.mod h1:uefL5Zy8/59SSG9FwwPEJVYH7/z6GImE8tYryHRyxH0=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116023656-5689746c0738 h1:exXn6yYIsuTYdGz/kH1lVwAC1R7XVT620L9S9hCwFkg=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116023656-5689746c0738/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024208-1e2013e0ec9b h1:LSmXRi8vNoyvdm8lCXqmnB1qwRT9sM4cnSKAhEBHOkk=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024208-1e2013e0ec9b/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024425-7789faef0398 h1:W0+lAVm9TcBgxkgs4wmto0czWsaEQhWWM7sJNodEATI=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024425-7789faef0398/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024754-8591d465174c h1:pempvYYScLT+QP3dPa5J0atwuyH2eG/wUmscJ9FmVUM=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116024754-8591d465174c/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116025022-5142a73cb696 h1:dP+rtOVU4eKi+cGOaOoDO2WF/xlNqSH3oXpBIC037XY=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116025022-5142a73cb696/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116025416-0f7fd31fc669 h1:TcvkI5C92P8ujx+qPEP2OduXqs/crnTNjy+2Zxj4FdU=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116025416-0f7fd31fc669/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116030707-3d2f98b3bcd8 h1:3EkJeMc5zncUgKqDIsmWAULIiWgG+0K/lTh0VYurK9c=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116030707-3d2f98b3bcd8/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116233746-795aa51358a1 h1:u2aw0QTtjCrBlnzKvWmHmQ1EIUGkd+ubDqgKWcxifcg=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116233746-795aa51358a1/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116234441-dec8b3ba5731 h1:ABf+ZX6Ny8FwHd8lWSjAWrSvMAq3quASKCDiYelSaBs=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116234441-dec8b3ba5731/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116235503-080cc287e8a3 h1:AfNssY1q5t7eqy/vsOXme97CKspaVhn9GHOorYrPpCs=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211116235503-080cc287e8a3/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211117000004-a01aae096d7c h1:yqcKMmiiJDnIpz47dZpr1/lJiE8QrZsWU/E7O5R/kZw=
gitlab.cs.umd.edu/dawn/dawn-go-common v0.0.0-20211117000004-a01aae096d7c/go.mod h1:wYTPcaDUzFbzXqQbPVSPV4095ugT7R3NhxzpTCPYQQ4=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
......
......@@ -3,8 +3,11 @@ package main
import (
"flag"
"fmt"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"gitlab.cs.umd.edu/dawn/dawn-go-common/common"
"gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/config"
......@@ -52,6 +55,8 @@ func registerPrometheus(app *fiber.App) {
prometheus := fiberprometheus.New(viper.GetString("app.name"))
prometheus.RegisterAt(app, viper.GetString("server.context-path")+"/metrics")
app.Use(prometheus.Middleware)
// app.Get(viper.GetString("server.context-path")+"/metrics", adaptor.HTTPHandler(promhttp.Handler()))
// app.Use(metrics.New())
}
func registerCors(app *fiber.App) {
......@@ -138,10 +143,21 @@ func main() {
app := CreateFiberApp()
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
signal.Notify(c, syscall.SIGTERM)
go func() {
_ = <-c
fmt.Println("Gracefully shutting down...")
_ = app.Shutdown()
}()
err2 := app.Listen(":" + viper.GetString("server.port"))
if err2 != nil {
panic(err2)
}
fmt.Println("Running cleanup tasks...")
common.SendDeadHeartbeat()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment