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

Method ForceUpdate

enterprise/coderd/proxyhealth/proxyhealth.go:164–172  ·  view source on GitHub ↗

ForceUpdate runs a single health check and updates the cache. If the health check fails, the cache is not updated and an error is returned. This is useful to trigger an update when a proxy is created or deleted.

(ctx context.Context)

Source from the content-addressed store, hash-verified

162// check fails, the cache is not updated and an error is returned. This is useful
163// to trigger an update when a proxy is created or deleted.
164func (p *ProxyHealth) ForceUpdate(ctx context.Context) error {
165 statuses, err := p.runOnce(ctx, time.Now())
166 if err != nil {
167 return err
168 }
169
170 p.storeProxyHealth(statuses)
171 return nil
172}
173
174// HealthStatus returns the current health status of all proxies stored in the
175// cache.

Callers 8

TestRegionsFunction · 0.80
TestDERPFunction · 0.80
TestDERPEndToEndFunction · 0.80

Calls 2

runOnceMethod · 0.95
storeProxyHealthMethod · 0.95

Tested by 7

TestRegionsFunction · 0.64
TestDERPFunction · 0.64
TestDERPEndToEndFunction · 0.64