mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:38:50 +02:00
fix(health): correct url for agent health check and properly update docker fallback url
This commit is contained in:
@@ -106,6 +106,7 @@ func NewDockerHealthMonitor(config types.HealthCheckConfig, client *docker.Share
|
|||||||
logger.Err(err).Msg("docker health check failed, using fallback")
|
logger.Err(err).Msg("docker health check failed, using fallback")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fallback.UpdateURL(u)
|
||||||
return fallback.CheckHealth()
|
return fallback.CheckHealth()
|
||||||
}
|
}
|
||||||
return result, nil
|
return result, nil
|
||||||
@@ -116,7 +117,7 @@ func NewDockerHealthMonitor(config types.HealthCheckConfig, client *docker.Share
|
|||||||
func NewAgentProxiedMonitor(config types.HealthCheckConfig, agent *agentpool.Agent, targetUrl *url.URL) Monitor {
|
func NewAgentProxiedMonitor(config types.HealthCheckConfig, agent *agentpool.Agent, targetUrl *url.URL) Monitor {
|
||||||
var mon monitor
|
var mon monitor
|
||||||
mon.init(targetUrl, config, func(u *url.URL) (result Result, err error) {
|
mon.init(targetUrl, config, func(u *url.URL) (result Result, err error) {
|
||||||
return CheckHealthAgentProxied(agent, config.Timeout, targetUrl)
|
return CheckHealthAgentProxied(agent, config.Timeout, u)
|
||||||
})
|
})
|
||||||
return &mon
|
return &mon
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user