mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-30 22:02:02 +02:00
refactor(routes): add excluded routes to health check and route list
- Updated route iteration to include all routes, including excluded ones. - Renamed existing functions for clarity. - Adjusted health info retrieval to reflect changes in route iteration. - Improved route management by adding health monitoring capabilities for excluded routes.
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
"github.com/lithammer/fuzzysearch/fuzzy"
|
||||
statequery "github.com/yusing/godoxy/internal/config/query"
|
||||
"github.com/yusing/godoxy/internal/metrics/period"
|
||||
metricsutils "github.com/yusing/godoxy/internal/metrics/utils"
|
||||
"github.com/yusing/godoxy/internal/route/routes"
|
||||
@@ -133,7 +132,7 @@ func (rs RouteStatuses) aggregate(limit int, offset int) Aggregated {
|
||||
r, ok := routes.Get(alias)
|
||||
if !ok {
|
||||
// also search for excluded routes
|
||||
r = statequery.SearchRoute(alias)
|
||||
r, ok = routes.Excluded.Get(alias)
|
||||
}
|
||||
if r != nil {
|
||||
displayName = r.DisplayName()
|
||||
|
||||
Reference in New Issue
Block a user