1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-09-26 12:14:17 -04:00

moving health ping to observatory as a standalone component

This commit is contained in:
Shelikhoo
2021-06-18 17:39:13 +01:00
parent a8dd708028
commit 9cb1566a78
14 changed files with 260 additions and 293 deletions

View File

@@ -114,25 +114,11 @@ func (r *Router) pickRouteInternal(ctx routing.Context) (*Rule, routing.Context,
// Start implements common.Runnable.
func (r *Router) Start() error {
for _, b := range r.balancers {
checker, ok := b.strategy.(routing.HealthChecker)
if !ok {
continue
}
checker.StartScheduler(b.SelectOutbounds)
}
return nil
}
// Close implements common.Closable.
func (r *Router) Close() error {
for _, b := range r.balancers {
checker, ok := b.strategy.(routing.HealthChecker)
if !ok {
continue
}
checker.StopScheduler()
}
return nil
}