Record origin changes and show them on the prefix page (closes #161)
check / check (push) Successful in 4m6s
check / check (push) Successful in 4m6s
The routing table records each prefix and origin AS pair's origin changes: when it gains its first peer and when it loses its last. Each row holds the prefix, the origin AS, announced or withdrawn, the peer count and the time. The prefix handler writes them to a new origin_changes table, and the database maintainer prunes each prefix to its newest 500 rows and 72 hours. The prefix page lists them newest first, at most 5,000. Model: deepseek-v4-pro
This commit is contained in:
@@ -55,6 +55,14 @@ type Store interface {
|
||||
WriteRouteChanges(changes []routetable.Change, newPeers map[string]uint) error
|
||||
ReadRouteTable(ctx context.Context) (*routetable.Table, error)
|
||||
|
||||
// Origin change operations: the prefix and origin AS pairs' first and
|
||||
// last peers, as the routing table records them.
|
||||
WriteOriginChanges(changes []routetable.OriginChange) error
|
||||
GetOriginChanges(
|
||||
ctx context.Context, prefix netip.Prefix, limit int,
|
||||
) ([]routetable.OriginChange, error)
|
||||
PruneOriginChanges(ctx context.Context) error
|
||||
|
||||
// ASN WHOIS operations
|
||||
GetNextStaleASN(ctx context.Context, staleThreshold time.Duration) (int, error)
|
||||
UpdateASNWHOIS(ctx context.Context, update *ASNWHOISUpdate) error
|
||||
|
||||
Reference in New Issue
Block a user