HealthStatus returns the current health status of all proxies stored in the cache.
()
| 174 | // HealthStatus returns the current health status of all proxies stored in the |
| 175 | // cache. |
| 176 | func (p *ProxyHealth) HealthStatus() map[uuid.UUID]ProxyStatus { |
| 177 | if p == nil { |
| 178 | // This can happen because workspace proxies are still an experiment. |
| 179 | // For the /regions endpoint, this will be nil in those cases. |
| 180 | return map[uuid.UUID]ProxyStatus{} |
| 181 | } |
| 182 | ptr := p.cache.Load() |
| 183 | if ptr == nil { |
| 184 | return map[uuid.UUID]ProxyStatus{} |
| 185 | } |
| 186 | return *ptr |
| 187 | } |
| 188 | |
| 189 | type ProxyStatus struct { |
| 190 | // ProxyStatus includes the value of the proxy at the time of checking. This is |