Remove routing table and snapshotter packages, update status page

- Remove routingtable package entirely as database handles all routing data
- Remove snapshotter package as database contains all information
- Rename 'Connection Status' box to 'RouteWatch' and add Go version, goroutines, memory usage
- Move IPv4/IPv6 prefix counts from Database Statistics to Routing Table box
- Add Peers count to Database Statistics box
- Add go-humanize dependency for memory formatting
- Update server to include new metrics in API responses
This commit is contained in:
2025-07-28 03:11:36 +02:00
parent d929f24f80
commit ae89468a1b
10 changed files with 66 additions and 1100 deletions

View File

@@ -396,6 +396,12 @@ func (d *Database) GetStats() (Stats, error) {
return stats, err
}
// Count peers
err = d.queryRow("SELECT COUNT(*) FROM bgp_peers").Scan(&stats.Peers)
if err != nil {
return stats, err
}
// Get database file size
fileInfo, err := os.Stat(d.path)
if err != nil {

View File

@@ -11,6 +11,7 @@ type Stats struct {
IPv4Prefixes int
IPv6Prefixes int
Peerings int
Peers int
FileSizeBytes int64
LiveRoutes int
IPv4PrefixDistribution []PrefixDistribution