ProxyManager constructor
ProxyManager({
- required GetProxies getProxies,
- required ValidateProxy validateProxy,
- required GetValidatedProxies getValidatedProxies,
- ProxyAnalyticsService? analyticsService,
- ProxyPreloaderService? preloaderService,
- ProxyCacheManager? cacheManager,
- RotationStrategyType strategyType = RotationStrategyType.roundRobin,
Creates a new ProxyManager with the given use cases
Implementation
ProxyManager({
required this.getProxies,
required this.validateProxy,
required this.getValidatedProxies,
this.analyticsService,
ProxyPreloaderService? preloaderService,
ProxyCacheManager? cacheManager,
RotationStrategyType strategyType = RotationStrategyType.roundRobin,
}) : _preloaderService = preloaderService,
_rotationStrategy = RotationStrategyFactory.createStrategy(
type: strategyType,
proxies: [],
) {
// Start the preloader service if provided
_preloaderService?.start();
}