Documentation
¶
Index ¶
- Variables
- type Proxy
- func (p *Proxy) Address() string
- func (p *Proxy) IsAlive() bool
- func (p *Proxy) MarkAlive()
- func (p *Proxy) MarkDead()
- func (p *Proxy) RecordFailure()
- func (p *Proxy) RecordRequest(latency time.Duration)
- func (p *Proxy) Stats() (requests, failures int64, avgLatency time.Duration)
- func (p *Proxy) String() string
- type ProxyType
- type RotationStrategy
- type Rotator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAllProxiesDead = errors.New("all proxies are dead")
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
Type ProxyType
Host string
Port string
Username string
Password string
// contains filtered or unexported fields
}
func (*Proxy) RecordFailure ¶
func (p *Proxy) RecordFailure()
func (*Proxy) RecordRequest ¶
type RotationStrategy ¶
type RotationStrategy int
const ( RotationRandom RotationStrategy = iota RotationSequential )
func ParseRotationStrategy ¶
func ParseRotationStrategy(s string) RotationStrategy
func (RotationStrategy) String ¶
func (s RotationStrategy) String() string
type Rotator ¶
type Rotator struct {
// contains filtered or unexported fields
}
func NewRotator ¶
func NewRotator(strategy RotationStrategy, skipDead bool, requestsPer int) *Rotator
func (*Rotator) AliveCount ¶
func (*Rotator) LoadFromFile ¶
func (*Rotator) LoadFromStrings ¶
Click to show internal directories.
Click to hide internal directories.