class

CRE::Policy::Evaluator

Inherits Reference < Object

Constants

Log = ::Log.for("cre.policy.evaluator")

Constructors

new(bus : Engine::EventBus, persistence : Persistence::Persistence, policies : Array(Policy) = REGISTRY.dup)
Source

Instance methods

evaluate(c : Domain::Credential, now : Time = Time.utc) : Nil

Evaluates a single credential. When more than one policy matches we raise PolicyConflictError instead of silently picking by registration order; conflicting policies are an operator bug, not a runtime decision.

Source
evaluate_all(now : Time = Time.utc) : Nil

evaluate_all groups policies by max_age and uses the persistence layer's 'overdue' query so we don't pull every credential into memory each tick.

Source
start
Source
stop
Source