aboutsummaryrefslogtreecommitdiff
path: root/plugin/erratic/health.go
blob: 1d9625e16a16ee80756c448a2c14d117bb35b314 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package erratic

import (
	"sync/atomic"
)

// Health implements the health.Healther interface.
func (e *Erratic) Health() bool {
	q := atomic.LoadUint64(&e.q)
	if e.drop > 0 && q%e.drop == 0 {
		return false
	}
	return true
}