Add internal/routetable, the routing table in memory (part of #122)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
A new package holds every prefix some peer carries. For each prefix and origin AS it keeps the set of peers that carry it, one bit per peer, and the two newest of their routes in full. It applies announcements, withdrawals and peers' sessions going down by the rule confirmed on the issue, and records which pairs changed for the database writes to come. It answers the IP lookup, an AS's prefixes, a prefix's origins, a sample of one mask length, and the counts the stats show. Nothing uses it yet. The peer sets use github.com/bits-and-blooms/bitset. The kept routes' times are held in order in github.com/google/btree, so the oldest and newest need no scan. Model: opus-5-5
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
# RouteWatch
|
||||
|
||||
RouteWatch is an MIT-licensed Go daemon by @sneak that monitors the BGP routing
|
||||
table in real time: it streams BGP UPDATE messages from the RIPE RIS Live
|
||||
service, maintains a live routing table in SQLite, and provides HTTP APIs for
|
||||
querying routing information.
|
||||
table in real time. It works like this:
|
||||
|
||||
- It streams BGP UPDATE messages from the RIPE RIS Live service.
|
||||
- It keeps a live routing table in SQLite.
|
||||
- It serves web pages and a JSON API for looking routes up.
|
||||
|
||||
## Rationale
|
||||
|
||||
@@ -233,6 +235,7 @@ routewatch/
|
||||
│ ├── routewatch/ # Core application logic
|
||||
│ ├── server/ # HTTP server and handlers
|
||||
│ ├── database/ # SQLite storage layer
|
||||
│ ├── routetable/ # The whole routing table in memory
|
||||
│ ├── streamer/ # RIPE RIS Live client
|
||||
│ ├── ristypes/ # BGP message data structures
|
||||
│ ├── logger/ # Structured logging wrapper
|
||||
|
||||
Reference in New Issue
Block a user