class

KemalWAF::RuleSnapshot

Inherits Reference / Object

============================================================================= Immutable Rule Snapshot

Represents a frozen, immutable collection of WAF rules Once created, the rules cannot be modified Used for atomic hot-reload without locks

Constants

Log = ::Log.for("rule_snapshot")

Constructors

empty

Empty snapshot for initialization

Source
new(rules : Array(Rule), version : Int64, file_checksums : Hash(String, String) = {} of String => String)
Source

Instance methods

created_at
Source
empty?

Check if snapshot is empty

Source
file_checksums
Source
find_by_id(id : Int32) : Rule | Nil

Get rule by ID (O(n) - consider index if needed)

Source
rule_count
Source
rules
Source
stats

Snapshot statistics

Source
version
Source