MCPcopy Create free account
hub / github.com/daodst/chat / BackoffInfo

Method BackoffInfo

federationapi/statistics/statistics.go:162–168  ·  view source on GitHub ↗

BackoffInfo returns information about the current or previous backoff. Returns the last backoffUntil time and whether the server is currently blacklisted or not.

()

Source from the content-addressed store, hash-verified

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.
162func (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.

Callers 4

TestBackoffFunction · 0.95
backgroundSendMethod · 0.45

Calls 1

LoadMethod · 0.80

Tested by 1

TestBackoffFunction · 0.76