All checks were successful
Linting and tests / Linting (push) Successful in 6s
40 lines
691 B
Go
40 lines
691 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"bunker/commons"
|
|
"bunker/server/internal/application"
|
|
)
|
|
|
|
func main() {
|
|
app := application.New()
|
|
|
|
lgr := app.NewLogger("module", "main")
|
|
lgr.Info(
|
|
"Starting bunkerd...",
|
|
"version", commons.Version,
|
|
"build_no", commons.Build,
|
|
"buint_on", commons.BuildDate,
|
|
"commit", commons.Commit,
|
|
"branch", commons.Branch,
|
|
)
|
|
|
|
if err := app.Start(); err != nil {
|
|
lgr.Error("Failed to start bunkerd!", "error", err.Error())
|
|
|
|
os.Exit(1)
|
|
}
|
|
|
|
lgr.Info("bunkerd started.")
|
|
|
|
<-app.ShutdownChan()
|
|
lgr.Info("Shutting down bunkerd...")
|
|
|
|
if err := app.Shutdown(); err != nil {
|
|
lgr.Error("Failed to shutdown bunkerd!", "error", err.Error())
|
|
|
|
os.Exit(1)
|
|
}
|
|
}
|