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()
|
2023-11-09 08:11:30 +00:00
|
|
|
logger, atomicLevel := pickLogger(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))
|
2023-05-30 14:01:20 +00:00
|
|
|
go application.Serve()
|
2022-09-08 14:57:22 +00:00
|
|
|
application.Wait()
|
2020-11-09 13:43:23 +00:00
|
|
|
}
|