mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-15 23:03:50 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
376ac61279 | ||
|
|
dca701e044 |
@@ -74,7 +74,11 @@ func NewMonitor(r types.Route) types.HealthMonCheck {
|
||||
}
|
||||
|
||||
func newMonitor(u *url.URL, cfg types.HealthCheckConfig, healthCheckFunc HealthCheckFunc) *monitor {
|
||||
cfg.ApplyDefaults(config.WorkingState.Load().Value().Defaults.HealthCheck)
|
||||
if state := config.WorkingState.Load(); state != nil {
|
||||
cfg.ApplyDefaults(state.Value().Defaults.HealthCheck)
|
||||
} else {
|
||||
cfg.ApplyDefaults(types.HealthCheckConfig{}) // use defaults from constants
|
||||
}
|
||||
mon := &monitor{
|
||||
config: cfg,
|
||||
checkHealth: healthCheckFunc,
|
||||
|
||||
Reference in New Issue
Block a user