Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Counters = NewHistogram()
Counters accumulates HTTP response status codes.
Functions ¶
This section is empty.
Types ¶
type Download ¶
type Download struct { Config config.Config ETagsDB *db.DB StartURL *url.URL Auth string Client HttpClient Fs afero.Fs // filesystem can be replaced with in-memory filesystem for testing Lockdown *throttle.Throttle // increases sharply when server gives 429 (Too Many Requests) responses, then resets LoopDelay *throttle.Throttle // increases only slightly when server gives 429; never decreases }
Download fetches URLs one by one, sequentially.
type SyncCounter ¶
type SyncCounter struct {
// contains filtered or unexported fields
}
func NewHistogram ¶
func NewHistogram() *SyncCounter
func (*SyncCounter) Increment ¶
func (c *SyncCounter) Increment(code int)
Increment adds one to the bucket indicated by code. This is safe for concurrent use.
func (*SyncCounter) Map ¶
func (c *SyncCounter) Map() map[int]int
Map accesses the histogram. This is safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.