client: add StatusExporter in service

This commit is contained in:
fatedier
2024-04-25 20:13:56 +08:00
parent c1893ee1b4
commit 69ff01d38b
2 changed files with 25 additions and 10 deletions

View File

@@ -363,11 +363,13 @@ func (s *TunnelServer) waitProxyStatusReady(name string, timeout time.Duration)
timer := time.NewTimer(timeout)
defer timer.Stop()
statusExporter := s.vc.Service().StatusExporter()
for {
select {
case <-ticker.C:
ps, err := s.vc.Service().GetProxyStatus(name)
if err != nil {
ps, ok := statusExporter.GetProxyStatus(name)
if !ok {
continue
}
switch ps.Phase {