(op Operation, heartbeatTimeout time.Duration, storageLastUpdated time.Time)
| 135 | } |
| 136 | |
| 137 | func (i *InstanceDesc) IsHealthy(op Operation, heartbeatTimeout time.Duration, storageLastUpdated time.Time) bool { |
| 138 | healthy := op.IsInstanceInStateHealthy(i.State) |
| 139 | |
| 140 | return healthy && i.IsHeartbeatHealthy(heartbeatTimeout, storageLastUpdated) |
| 141 | } |
| 142 | |
| 143 | // IsHeartbeatHealthy returns whether the heartbeat timestamp for the ingester is within the |
| 144 | // specified timeout period. A timeout of zero disables the timeout; the heartbeat is ignored. |