Remove RoutingTableHandler and snapshotter, use database for route stats

- Remove RoutingTableHandler as PrefixHandler maintains live_routes table
- Update server to get route counts from database instead of in-memory routing table
- Add GetLiveRouteCounts method to database for IPv4/IPv6 route counts
- Use metrics tracker in PrefixHandler for route update rates
- Remove snapshotter entirely as database contains all information
- Update tests to work without routing table
This commit is contained in:
2025-07-28 03:02:44 +02:00
parent cb1f4d9052
commit d929f24f80
6 changed files with 77 additions and 265 deletions

View File

@@ -41,6 +41,7 @@ type Store interface {
UpsertLiveRoute(route *LiveRoute) error
DeleteLiveRoute(prefix string, originASN int, peerIP string) error
GetPrefixDistribution() (ipv4 []PrefixDistribution, ipv6 []PrefixDistribution, err error)
GetLiveRouteCounts() (ipv4Count, ipv6Count int, err error)
// Lifecycle
Close() error