ms-tester/main.go

34 lines
925 B
Go
Raw Normal View History

2024-07-27 07:31:04 +00:00
package main
func main() {
2024-08-16 11:05:29 +00:00
//cfg := lib.MustSetupConfig()
//
//var logger *zap.Logger
//if cfg.Env == "prod" {
// logger = zap.Must(zap.NewProduction())
//} else if cfg.Env == "dev" {
// logger = zap.Must(zap.NewDevelopment())
//} else {
// panic(fmt.Sprintf(`error reading config: env expected "prod" or "dev", got "%s"`, cfg.Env))
//}
//postgres := storage.NewUserStorage(cfg.PostgresDSN, logger)
//
//vk := storage.NewValkeyStorage(cfg.RedisDSN, cfg, logger)
//
//sessionService := services.NewSessionService(vk, postgres, cfg)
//userService := services.NewUserService(postgres, vk, vk, cfg)
//
//server := transport.NewAuthServer(sessionService, userService, grpc.NewServer(), logger)
//
//application := app.NewApp(cfg, server)
//
//application.Start()
//
//stop := make(chan os.Signal, 1)
//signal.Notify(stop, syscall.SIGTERM, syscall.SIGINT)
//
//<-stop
//application.GracefullyStop()
2024-07-27 07:31:04 +00:00
}