fixed some issues

This commit is contained in:
yusing
2025-02-11 09:16:21 +08:00
parent 508b093278
commit 07bce90521
9 changed files with 243 additions and 10 deletions

View File

@@ -127,6 +127,10 @@ func (p *Provider) Start(parent task.Parent) E.Error {
if err := errs.Error(); err != nil {
return err.Subject(p.String())
}
if p.t == types.ProviderTypeAgent {
t.OnCancel("remove agent", p.ProviderImpl.(*AgentProvider).AgentConfig.Remove)
}
return nil
}

View File

@@ -206,7 +206,7 @@ func (r *ReveseProxyRoute) newHealthMonitor() interface {
health.HealthChecker
} {
if a := r.Agent(); a != nil {
target := monitor.AgentCheckHealthTargetFromURL(r.ProxyURL)
target := monitor.AgentTargetFromURL(r.ProxyURL)
return monitor.NewAgentRouteMonitor(a, r.HealthCheck, target)
}
return monitor.NewHTTPHealthMonitor(r.ProxyURL, r.HealthCheck)