feat: integration actions to judge logic and update docs for this
Some checks failed
build / build (push) Failing after 1m55s

This commit is contained in:
d3m0k1d
2026-02-24 18:03:17 +03:00
parent fd38af9cb0
commit 5cc61aca75
6 changed files with 236 additions and 25 deletions

View File

@@ -5,6 +5,7 @@ import (
"strings"
"time"
"github.com/d3m0k1d/BanForge/internal/actions"
"github.com/d3m0k1d/BanForge/internal/blocker"
"github.com/d3m0k1d/BanForge/internal/config"
"github.com/d3m0k1d/BanForge/internal/logger"
@@ -124,6 +125,17 @@ func (j *Judge) Tribunal() {
metrics.IncError()
break
}
for _, action := range rule.Action {
executor := &actions.Executor{Action: action}
if err := executor.Execute(); err != nil {
j.logger.Error("Action execution failed",
"rule", rule.Name,
"action_type", action.Type,
"error", err)
}
}
j.logger.Info(
"IP banned successfully",
"ip",