2019-11-06 12:33:46 +00:00
|
|
|
package main
|
|
|
|
|
2020-11-09 13:43:23 +00:00
|
|
|
import (
|
2021-05-25 10:23:29 +00:00
|
|
|
"context"
|
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
2020-11-09 13:43:23 +00:00
|
|
|
)
|
|
|
|
|
2021-03-30 22:46:33 +00:00
|
|
|
func main() {
|
2022-09-08 14:57:22 +00:00
|
|
|
globalContext, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
|
|
|
v := settings()
|
|
|
|
logger, atomicLevel := newLogger(v)
|
2022-03-25 13:06:33 +00:00
|
|
|
|
2022-09-08 14:57:22 +00:00
|
|
|
application := newApp(globalContext, WithLogger(logger, atomicLevel), WithConfig(v))
|
|
|
|
go application.Serve(globalContext)
|
|
|
|
application.Wait()
|
2020-11-09 13:43:23 +00:00
|
|
|
}
|