Пример #1
0
        public ProxyConfigManager(
            ILogger <ProxyConfigManager> logger,
            IProxyConfigProvider provider,
            IClusterManager clusterManager,
            IRouteManager routeManager,
            IEnumerable <IProxyConfigFilter> filters,
            IConfigValidator configValidator,
            ProxyEndpointFactory proxyEndpointFactory,
            ITransformBuilder transformBuilder,
            IProxyHttpClientFactory httpClientFactory,
            IActiveHealthCheckMonitor activeHealthCheckMonitor)
        {
            _logger                   = logger ?? throw new ArgumentNullException(nameof(logger));
            _provider                 = provider ?? throw new ArgumentNullException(nameof(provider));
            _clusterManager           = clusterManager ?? throw new ArgumentNullException(nameof(clusterManager));
            _routeManager             = routeManager ?? throw new ArgumentNullException(nameof(routeManager));
            _filters                  = filters ?? throw new ArgumentNullException(nameof(filters));
            _configValidator          = configValidator ?? throw new ArgumentNullException(nameof(configValidator));
            _proxyEndpointFactory     = proxyEndpointFactory ?? throw new ArgumentNullException(nameof(proxyEndpointFactory));
            _transformBuilder         = transformBuilder ?? throw new ArgumentNullException(nameof(transformBuilder));
            _httpClientFactory        = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory));
            _activeHealthCheckMonitor = activeHealthCheckMonitor ?? throw new ArgumentNullException(nameof(activeHealthCheckMonitor));

            _conventions   = new List <Action <EndpointBuilder> >();
            DefaultBuilder = new ReverseProxyConventionBuilder(_conventions);

            _changeToken = new CancellationChangeToken(_cancellationTokenSource.Token);
        }
        public QueueDelegationRuleProvider(
            IServerDelegationFeature delegationFeature,
            IProxyConfigProvider proxyConfigProvider,
            ILogger <QueueDelegationRuleProvider> logger)
        {
            this.delegationFeature   = delegationFeature;
            this.proxyConfigProvider = proxyConfigProvider;
            this.logger = logger;
            this.rules  = new Dictionary <string, DelegationRule>();

            this.UpdateRules();
        }
Пример #3
0
        public ProxyConfigManager(
            ILogger <ProxyConfigManager> logger,
            IProxyConfigProvider provider,
            IRuntimeRouteBuilder routeEndpointBuilder,
            IClusterManager clusterManager,
            IRouteManager routeManager,
            IEnumerable <IProxyConfigFilter> filters,
            IConfigValidator configValidator)
        {
            _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
            _provider             = provider ?? throw new ArgumentNullException(nameof(provider));
            _routeEndpointBuilder = routeEndpointBuilder ?? throw new ArgumentNullException(nameof(routeEndpointBuilder));
            _clusterManager       = clusterManager ?? throw new ArgumentNullException(nameof(clusterManager));
            _routeManager         = routeManager ?? throw new ArgumentNullException(nameof(routeManager));
            _filters              = filters ?? throw new ArgumentNullException(nameof(filters));
            _configValidator      = configValidator ?? throw new ArgumentNullException(nameof(configValidator));

            _changeToken = new CancellationChangeToken(_cancellationTokenSource.Token);
        }
Пример #4
0
 public YarpController(IProxyConfigProvider proxyConfigProvider)
 {
     _inMemoryConfigProvider = (InMemoryConfigProvider)proxyConfigProvider;
 }
 public SuiDaoLoginHandler(ILogger <SuiDaoLoginHandler> logger, IProxyConfigProvider proxyConfig)
     : base(logger, proxyConfig)
 {
 }
Пример #6
0
 public ConfigState(IProxyConfigProvider provider, IProxyConfig config)
 {
     Provider     = provider;
     LatestConfig = config;
 }
 public YarpController(IProxyConfigProvider proxyConfigProvider)
 {
     _proxyConfigProvider = proxyConfigProvider;
 }
Пример #8
0
 public ProxyController(IProxyDynamicRoutesConfigurationService proxyConfigurationService, IProxyConfigProvider proxyConfigProvider, IConfiguration configuration)
 {
     this.proxyConfigurationService = proxyConfigurationService ?? throw new ArgumentNullException(nameof(proxyConfigurationService));
     this.proxyConfigProvider       = proxyConfigProvider ?? throw new ArgumentNullException(nameof(proxyConfigProvider));
     this.configuration             = (IConfigurationRoot)configuration ?? throw new ArgumentNullException(nameof(configuration));
 }