fix: routes iter missing stream
Some checks are pending
Docker Image CI (nightly) / build-nightly (push) Waiting to run
Docker Image CI (nightly) / build-nightly-agent (push) Waiting to run

This commit is contained in:
yusing 2025-05-10 21:31:38 +08:00
parent cd291556fc
commit a8ba42e360

View file

@ -15,6 +15,11 @@ func Iter(yield func(r Route) bool) {
break break
} }
} }
for _, r := range Stream.Iter {
if !yield(r) {
break
}
}
} }
func IterKV(yield func(alias string, r Route) bool) { func IterKV(yield func(alias string, r Route) bool) {
@ -23,6 +28,11 @@ func IterKV(yield func(alias string, r Route) bool) {
break break
} }
} }
for k, r := range Stream.Iter {
if !yield(k, r) {
break
}
}
} }
func NumRoutes() int { func NumRoutes() int {