IsHealthy returns whether the pool is healthy.
()
| 354 | |
| 355 | // IsHealthy returns whether the pool is healthy. |
| 356 | func (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. |
| 366 | func (p *Pool) HealthInfo() pb.HealthInfo { |
no test coverage detected