BackoffInfo returns information about the current or previous backoff. Returns the last backoffUntil time and whether the server is currently blacklisted or not.
()
| 160 | // BackoffInfo returns information about the current or previous backoff. |
| 161 | // Returns the last backoffUntil time and whether the server is currently blacklisted or not. |
| 162 | func (s *ServerStatistics) BackoffInfo() (*time.Time, bool) { |
| 163 | until, ok := s.backoffUntil.Load().(time.Time) |
| 164 | if ok { |
| 165 | return &until, s.blacklisted.Load() |
| 166 | } |
| 167 | return nil, s.blacklisted.Load() |
| 168 | } |
| 169 | |
| 170 | // Blacklisted returns true if the server is blacklisted and false |
| 171 | // otherwise. |