DenylistService constructor
- SecurityConfig _config,
- MetricsCollector _metrics, {
- String? storagePath,
- Client? httpClient,
Creates a denylist service from security configuration and metrics.
storagePath is an optional local file path used to persist a cached
copy of the last successfully loaded list. When provided, the service
falls back to the cached copy if the configured source is unavailable.
Implementation
DenylistService(
this._config,
this._metrics, {
String? storagePath,
http.Client? httpClient,
}) : _storagePath = storagePath,
_httpClient = httpClient ?? http.Client(),
_internalHttpClient = httpClient == null {
_logger = Logger('DenylistService');
_snapshot = _emptySnapshot();
}