fix some typos in source comments
Signed-off-by: bin liu <liubin0329@gmail.com>
This commit is contained in:
parent
5ded64812a
commit
e0521d2d01
10 changed files with 16 additions and 16 deletions
|
@ -220,7 +220,7 @@ type retryingSink struct {
|
|||
sink Sink
|
||||
closed bool
|
||||
|
||||
// circuit breaker hueristics
|
||||
// circuit breaker heuristics
|
||||
failures struct {
|
||||
threshold int
|
||||
recent int
|
||||
|
@ -317,7 +317,7 @@ func (rs *retryingSink) wait(backoff time.Duration) {
|
|||
time.Sleep(backoff)
|
||||
}
|
||||
|
||||
// reset marks a succesful call.
|
||||
// reset marks a successful call.
|
||||
func (rs *retryingSink) reset() {
|
||||
rs.failures.recent = 0
|
||||
rs.failures.last = time.Time{}
|
||||
|
@ -330,7 +330,7 @@ func (rs *retryingSink) failure() {
|
|||
}
|
||||
|
||||
// proceed returns true if the call should proceed based on circuit breaker
|
||||
// hueristics.
|
||||
// heuristics.
|
||||
func (rs *retryingSink) proceed() bool {
|
||||
return rs.failures.recent < rs.failures.threshold ||
|
||||
time.Now().UTC().After(rs.failures.last.Add(rs.failures.backoff))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue