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

Method IsHealthy

conn/pool.go:356–363  ·  view source on GitHub ↗

IsHealthy returns whether the pool is healthy.

()

Source from the content-addressed store, hash-verified

354
355// IsHealthy returns whether the pool is healthy.
356func (p *Pool) IsHealthy() bool {
357 if p == nil {
358 return false
359 }
360 p.RLock()
361 defer p.RUnlock()
362 return time.Since(p.lastEcho) < 4*echoDuration
363}
364
365// HealthInfo returns the healthinfo.
366func (p *Pool) HealthInfo() pb.HealthInfo {

Callers 3

HealthInfoMethod · 0.95
GetMethod · 0.80
ConnectMethod · 0.80

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected