refactor(db): normalize asn prefix cache and ttl cleanup
Строки asn_prefix_cache_row; периодический prune через evobgp-ingest. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -112,6 +112,9 @@ type Backend interface {
|
||||
|
||||
// Ping verifies backend connectivity (no-op for in-memory).
|
||||
Ping(ctx context.Context) error
|
||||
|
||||
// RunPeriodicMaintenance prunes stale DB rows (no-op for in-memory).
|
||||
RunPeriodicMaintenance(ctx context.Context)
|
||||
}
|
||||
|
||||
// ASNPrefixCacheEntry is a cached RIPEstat response for one ASN.
|
||||
|
||||
@@ -305,6 +305,11 @@ func (m *Memory) Ping(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunPeriodicMaintenance is a no-op for the in-memory backend.
|
||||
func (m *Memory) RunPeriodicMaintenance(ctx context.Context) {
|
||||
_ = ctx
|
||||
}
|
||||
|
||||
// ListTenantIDs returns tenant ids sorted lexicographically.
|
||||
func (m *Memory) ListTenantIDs() ([]string, error) {
|
||||
m.mu.RLock()
|
||||
|
||||
Reference in New Issue
Block a user