feat(backend): sync limiters on agent connect

Implemented full sync of speed limit configurations when an Agent connects via WebSocket. This ensures that even fresh or restarted agents receive the necessary limiter configurations.
This commit is contained in:
sagit
2026-02-09 08:47:13 +00:00
parent 7919dfde59
commit 3d7a0b697d
3 changed files with 36 additions and 1 deletions
+3 -1
View File
@@ -62,11 +62,13 @@ type flowItem struct {
}
func New(repo *sqlite.Repository, jwtSecret string) *Handler {
return &Handler{
h := &Handler{
repo: repo,
jwtSecret: jwtSecret,
wsServer: ws.NewServer(repo, jwtSecret),
}
h.wsServer.OnNodeConnected = h.onNodeConnected
return h
}
func (h *Handler) WebSocketHandler() http.Handler {