Accept Retry-After header on discovery lookup failures

This commit is contained in:
Jakob Borg
2015-12-01 09:57:53 +01:00
parent 3008dc76d3
commit 9f2dc4554d
3 changed files with 39 additions and 11 deletions

View File

@@ -22,10 +22,11 @@ type Finder interface {
}
type CacheEntry struct {
Direct []string `json:"direct"`
Relays []Relay `json:"relays"`
when time.Time // When did we get the result
found bool // Is it a success (cacheTime applies) or a failure (negCacheTime applies)?
Direct []string `json:"direct"`
Relays []Relay `json:"relays"`
when time.Time // When did we get the result
found bool // Is it a success (cacheTime applies) or a failure (negCacheTime applies)?
validUntil time.Time // Validity time, overrides normal calculation
}
// A FinderService is a Finder that has background activity and must be run as