Documentation
¶
Index ¶
- type Manager
- func (m *Manager) AddProxies(proxies ...string)
- func (m *Manager) ForgiveProxy(proxy string)
- func (m *Manager) GetGoodProxy() (string, *http.Client)
- func (m *Manager) PunishProxy(proxy string)
- func (m *Manager) WithAutoProxyTester(concurrentTest int) *Manager
- func (m *Manager) WithAutoRefresh(every time.Duration) *Manager
- func (m *Manager) WithFuncTest(fn func(*http.Client) bool) *Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// testing
ProxiesTest chan string
TimeoutTest time.Duration
URLTest string
IP net.IP
ProxiesTested map[string]int
MtxTest sync.Mutex
FuncTest func(*http.Client) bool
// good to use
MtxGood sync.Mutex
ProxiesGood map[string][]time.Time
ProxiesGoodStrikes map[string]int
StrikeLimit int
Requests int
TimeWindow time.Duration
TimeoutGood time.Duration
}
func NewDefaultManager ¶
func NewDefaultManager() *Manager
func (*Manager) AddProxies ¶
func (*Manager) ForgiveProxy ¶
func (*Manager) PunishProxy ¶
func (*Manager) WithAutoProxyTester ¶
Click to show internal directories.
Click to hide internal directories.