fix(health_monitor): fix UpdateURL behavior in Docker and AgentProxied health monitor

This commit is contained in:
yusing
2025-11-07 00:53:34 +08:00
parent bbb1b8497f
commit 83d70d3bb2
3 changed files with 22 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package monitor
import (
"net/http"
"net/url"
"github.com/bytedance/sonic"
"github.com/docker/docker/api/types/container"
@@ -49,6 +50,13 @@ func (mon *DockerHealthMonitor) Start(parent task.Parent) gperr.Error {
return nil
}
func (mon *DockerHealthMonitor) UpdateURL(url *url.URL) {
mon.monitor.UpdateURL(url)
if mon.fallback != nil {
mon.fallback.UpdateURL(url)
}
}
func (mon *DockerHealthMonitor) interceptInspectResponse(resp *http.Response) (intercepted bool, err error) {
if resp.StatusCode != http.StatusOK {
return false, nil