feat(topology): serve bounded route links and identify decoded Public traffic

This commit is contained in:
n30nex committed 2026-10-04 01:03:08 -04:00
1 parent 53f2467864
commit 84ac3c8781
19 files changed
+486

No files matched your search

+4
View File
@@ -446,3 +446,7 @@ func TestCachedReader_InvalidateObserver(t *testing.T) {
func (s *stubReader) GetRouteEvidence(_ context.Context, _, _ string, _ api.RouteEvidenceQuery) (*api.RouteEvidence, error) {
return nil, nil
}
func (s *stubReader) GetTopologyLinks(_ context.Context, _ []string, _ time.Time, _ time.Time) (*api.TopologyLinks, error) {
return &api.TopologyLinks{}, nil
}
+9
View File
@@ -378,3 +378,12 @@ func (cr *CachedReader) SearchCrossIATARoutes(ctx context.Context, fromHash, fro
func (cr *CachedReader) ListTraceTags(ctx context.Context, iatas []string, scope, traceType string, since, until time.Time, cursor time.Time, cursorTag string, limit int32) ([]api.TraceTagSummary, error) {
return cr.inner.ListTraceTags(ctx, iatas, scope, traceType, since, until, cursor, cursorTag, limit)
}
func (cr *CachedReader) GetTopologyLinks(ctx context.Context, iatas []string, since, until time.Time) (*api.TopologyLinks, error) {
regions := append([]string{}, iatas...)
sort.Strings(regions)
key := fmt.Sprintf("beacon:topology:%s:%d:%d", strings.Join(regions, ","), since.Unix(), until.Unix())
return getOrSet(ctx, cr.c, key, 30*time.Second, func(ctx context.Context) (*api.TopologyLinks, error) {
return cr.inner.GetTopologyLinks(ctx, iatas, since, until)
})
}