(op Operation, heartbeatTimeout time.Duration, now time.Time)
| 174 | } |
| 175 | |
| 176 | func (i *InstanceDesc) IsHealthy(op Operation, heartbeatTimeout time.Duration, now time.Time) bool { |
| 177 | healthy := op.IsInstanceInStateHealthy(i.State) |
| 178 | |
| 179 | return healthy && i.IsHeartbeatHealthy(heartbeatTimeout, now) |
| 180 | } |
| 181 | |
| 182 | // IsHeartbeatHealthy returns whether the heartbeat timestamp for the ingester is within the |
| 183 | // specified timeout period. |