Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyService ¶
type ProxyService struct {
FetcherUtil utils.FetcherUtilInterface
URLParserUtil utils.URLParserUtilInterface
HTTPTestingSites []string
HTTPSTestingSites []string
UserAgents []string
Semaphore chan struct{}
}
func (*ProxyService) GetRandomUserAgent ¶
func (s *ProxyService) GetRandomUserAgent() string
func (*ProxyService) GetTestingSite ¶
func (s *ProxyService) GetTestingSite(category string) string
type ProxyServiceInterface ¶
type ProxyServiceInterface interface {
Check(category string, ip string, port string) (*entity.Proxy, error)
GetTestingSite(category string) string
GetRandomUserAgent() string
}
func NewProxyService ¶
func NewProxyService( fetcherUtil utils.FetcherUtilInterface, urlParserUtil utils.URLParserUtilInterface, httpTestingSites []string, httpsTestingSites []string, userAgents []string, ) ProxyServiceInterface
Click to show internal directories.
Click to hide internal directories.