1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-15 01:25:00 +02:00

Hello world

This commit is contained in:
Tim Voronov
2018-09-18 16:42:38 -04:00
parent c872f4565b
commit e02e861240
132 changed files with 22163 additions and 2 deletions

View File

@ -0,0 +1,37 @@
package http
import "github.com/sethgrid/pester"
type (
Option func(opts *pester.Client)
)
func WithDefaultBackoff() Option {
return func(opts *pester.Client) {
opts.Backoff = pester.DefaultBackoff
}
}
func WithLinearBackoff() Option {
return func(opts *pester.Client) {
opts.Backoff = pester.LinearBackoff
}
}
func WithExponentialBackoff() Option {
return func(opts *pester.Client) {
opts.Backoff = pester.ExponentialBackoff
}
}
func WithMaxRetries(value int) Option {
return func(opts *pester.Client) {
opts.MaxRetries = value
}
}
func WithConcurrency(value int) Option {
return func(opts *pester.Client) {
opts.Concurrency = value
}
}