frostfs-http-gw/main.go
Denis Kirillov 939f5f0c65 [#200] Reload config level and metrics on SIGHUP
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-09-16 17:08:20 +03:00

17 lines
372 B
Go

package main
import (
"context"
"os/signal"
"syscall"
)
func main() {
globalContext, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
v := settings()
logger, atomicLevel := newLogger(v)
application := newApp(globalContext, WithLogger(logger, atomicLevel), WithConfig(v))
go application.Serve(globalContext)
application.Wait()
}