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