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

Method storeProxyHealth

enterprise/coderd/proxyhealth/proxyhealth.go:148–159  ·  view source on GitHub ↗
(statuses map[uuid.UUID]ProxyStatus)

Source from the content-addressed store, hash-verified

146}
147
148func (p *ProxyHealth) storeProxyHealth(statuses map[uuid.UUID]ProxyStatus) {
149 var proxyHosts []*agplproxyhealth.ProxyHost
150 for _, s := range statuses {
151 if s.ProxyHost != nil {
152 proxyHosts = append(proxyHosts, s.ProxyHost)
153 }
154 }
155
156 // Store the statuses in the cache before any other quick values.
157 p.cache.Store(&statuses)
158 p.proxyHosts.Store(&proxyHosts)
159}
160
161// ForceUpdate runs a single health check and updates the cache. If the health
162// check fails, the cache is not updated and an error is returned. This is useful

Callers 2

RunMethod · 0.95
ForceUpdateMethod · 0.95

Calls 1

StoreMethod · 0.45

Tested by

no test coverage detected