feat: wire configured harness execution

This commit is contained in:
kami
2026-07-26 20:06:44 +04:00
parent 5d45351613
commit dc3cebebf8
5 changed files with 71 additions and 3 deletions
+6
View File
@@ -31,6 +31,7 @@ type Router struct {
Now func() time.Time
backoff map[string]time.Time
attempts map[string]int
OnLease func(domain.Event) error
}
func (r *Router) init() {
@@ -99,6 +100,11 @@ func (r *Router) AssignPending() ([]domain.Event, error) {
}
r.attempts[t.ID]++
out = append(out, e)
if r.OnLease != nil {
if err := r.OnLease(e); err != nil {
return out, err
}
}
break
}
}