api: enrich provider statistifcs

This commit is contained in:
yusing
2025-01-15 09:06:54 +08:00
parent 2af2346e35
commit 04e118c081
7 changed files with 97 additions and 32 deletions

View File

@@ -180,6 +180,13 @@ func (r *HTTPRoute) ServeHTTP(w http.ResponseWriter, req *http.Request) {
r.handler.ServeHTTP(w, req)
}
func (r *HTTPRoute) Health() health.Status {
if r.HealthMon != nil {
return r.HealthMon.Status()
}
return health.StatusUnknown
}
func (r *HTTPRoute) addToLoadBalancer(parent task.Parent) {
var lb *loadbalancer.LoadBalancer
cfg := r.Raw.LoadBalance