feat: API replicas over HAProxy (3)

This commit is contained in:
2026-11-06 03:26:54 +03:00
parent de2f63b926
commit ec111aadfb
32 changed files with 396 additions and 147 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ import (
"messenger/internal/handler"
)
func New(h *handler.Handler) http.Handler {
func New(h *handler.Handler, instanceID string) http.Handler {
r := chi.NewRouter()
r.Use(handler.RequestID, h.AccessLog, h.Recoverer)
r.Use(handler.InstanceID(instanceID), handler.RequestID, h.AccessLog, h.Recoverer)
r.NotFound(h.NotFound)
r.MethodNotAllowed(h.MethodNotAllowed)