updateInterval is used to determine a replicas state. If the replica was updated > the time, it's considered healthy. If the replica was updated < the time, it's considered stale.
()
| 146 | // If the replica was updated > the time, it's considered healthy. |
| 147 | // If the replica was updated < the time, it's considered stale. |
| 148 | func (m *Manager) updateInterval() time.Time { |
| 149 | return dbtime.Now().Add(-3 * m.options.UpdateInterval) |
| 150 | } |
| 151 | |
| 152 | // loop runs the replica update sequence on an update interval. |
| 153 | func (m *Manager) loop(ctx context.Context) { |
no test coverage detected