Commit Graph
4 Commits
Author SHA1 Message Date
Chris Beck 35b274bbd3 clippy 2025-12-05 19:42:30 -07:00
Chris Beck f899d391b9 introduce log_buffer type to cleanup concurrency & correctness
also cargo fmt
2025-12-05 19:40:33 -07:00
Chris Beck a214b8e474 introduce and use new route framework
in this change:

* new "concurrent map" API using RwLock<HashMap> optimized for
  frequent reads.
* we no longer have a concurrent map of log handlers, we instead
  have a log handler containing a concurrent map from origins to
  circular buffers
* we have a general concept of a "Limit" now which replaces AlertRule
* A route consists of a filter, plus any number of limits, which
  can be per-origin limits or global limits
* The set of routes is disjunctive, while the filters and limits are conjunctive
* Limits can also apply per source location
* Different types of rate limiters are unified under the "Limiter"
  abstraction
* The log handler also has a set of overall limiters that can be applied
  at the end
* This means we can relatively easily express disjunctions of conjunctions

I think the route structure will also be relatively easy to express in toml
2025-12-05 19:10:37 -07:00
Chris Beck ffa1246e51 listen on udp and tcp for json logs as well 2025-12-05 15:12:20 -07:00