MCPcopy Index your code
hub / github.com/InferCore/InferCore / peekFreshHealthSnapshot

Method peekFreshHealthSnapshot

internal/server/server.go:305–312  ·  view source on GitHub ↗
(ttl time.Duration)

Source from the content-addressed store, hash-verified

303}
304
305func (s *Server) peekFreshHealthSnapshot(ttl time.Duration) map[string]bool {
306 s.healthMu.Lock()
307 defer s.healthMu.Unlock()
308 if s.healthSnapshot != nil && time.Since(s.healthAt) < ttl {
309 return cloneBoolMap(s.healthSnapshot)
310 }
311 return nil
312}
313
314// probeBackendHealth runs Health with per-backend timeouts independent of the caller context
315// (e.g. short /infer request_timeout_ms must not cancel health probes).

Callers 1

cachedBackendHealthMethod · 0.95

Calls 1

cloneBoolMapFunction · 0.85

Tested by

no test coverage detected