mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-21 07:51:28 +02:00
fix(route): incorrect health status for idlewatcher dependencies
This commit is contained in:
@@ -366,6 +366,13 @@ func (r *Route) HealthMonitor() health.HealthMonitor {
|
||||
return r.HealthMon
|
||||
}
|
||||
|
||||
func (r *Route) SetHealthMonitor(m health.HealthMonitor) {
|
||||
if r.HealthMon != nil && r.HealthMon != m {
|
||||
r.HealthMon.Finish("health monitor replaced")
|
||||
}
|
||||
r.HealthMon = m
|
||||
}
|
||||
|
||||
func (r *Route) IdlewatcherConfig() *idlewatcher.Config {
|
||||
return r.Idlewatcher
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ type (
|
||||
GetProvider() Provider
|
||||
TargetURL() *net.URL
|
||||
HealthMonitor() health.HealthMonitor
|
||||
SetHealthMonitor(m health.HealthMonitor)
|
||||
References() []string
|
||||
|
||||
Started() <-chan struct{}
|
||||
|
||||
Reference in New Issue
Block a user