MCPcopy Create free account
hub / github.com/coder/coder / HealthStatus

Method HealthStatus

enterprise/coderd/proxyhealth/proxyhealth.go:176–187  ·  view source on GitHub ↗

HealthStatus returns the current health status of all proxies stored in the cache.

()

Source from the content-addressed store, hash-verified

174// HealthStatus returns the current health status of all proxies stored in the
175// cache.
176func (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
189type ProxyStatus struct {
190 // ProxyStatus includes the value of the proxy at the time of checking. This is

Callers 9

TestProxyHealth_NilFunction · 0.95
derpMapperFunction · 0.80
patchWorkspaceProxyMethod · 0.80
workspaceProxyMethod · 0.80
fetchWorkspaceProxiesMethod · 0.80

Calls 1

LoadMethod · 0.45

Tested by 5

TestProxyHealth_NilFunction · 0.76