fix(s3): handle storage outages and check bucket readiness

This commit is contained in:
kk10
2026-11-05 11:04:41 +03:00
parent 592594ae94
commit d467cab01a
10 changed files with 127 additions and 22 deletions
+1
View File
@@ -115,6 +115,7 @@ func Run() error {
cfg.Server.MaxInflightRequests,
cfg.S3.MaxUploadBytes,
pool,
s3Client,
authService,
userService,
chatService,
+2 -1
View File
@@ -18,6 +18,7 @@ func NewRouter(
maxInflightRequests int,
maxUploadBytes int,
db handler.Pinger,
storage handler.Pinger,
authService *service.AuthService,
userService *service.UserService,
chatService *service.ChatService,
@@ -26,7 +27,7 @@ func NewRouter(
) http.Handler {
router := chi.NewRouter()
healthHandler := handler.NewHealthHandler(log, db)
healthHandler := handler.NewHealthHandler(log, db, storage)
authHandler := handler.NewAuthHandler(authService)
userHandler := handler.NewUserHandler(userService)
chatHandler := handler.NewChatHandler(chatService)