MCPcopy
hub / github.com/dgraph-io/dgraph / HealthInfo

Method HealthInfo

conn/pool.go:366–376  ·  view source on GitHub ↗

HealthInfo returns the healthinfo.

()

Source from the content-addressed store, hash-verified

364
365// HealthInfo returns the healthinfo.
366func (p *Pool) HealthInfo() pb.HealthInfo {
367 ok := p.IsHealthy()
368 p.Lock()
369 defer p.Unlock()
370 p.healthInfo.Status = "healthy"
371 if !ok {
372 p.healthInfo.Status = "unhealthy"
373 }
374 p.healthInfo.LastEcho = p.lastEcho.Unix()
375 return p.healthInfo
376}

Callers 1

HealthMethod · 0.80

Calls 3

IsHealthyMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected