configure method
void
configure({})
Configures resolution. resolver overrides source entirely, for hosts
that map tenants some other way (a lookup table, a signed token).
Implementation
void configure({
DVTenantIsolation? isolation,
DVTenantSource? source,
String? headerName,
String? queryParameterName,
Set<String>? ignoredHostLabels,
String? Function(Uri uri, Map<String, String> headers)? resolver,
}) {
if (isolation != null) _isolation = isolation;
if (source != null) _source = source;
if (headerName != null) _headerName = headerName.toLowerCase();
if (queryParameterName != null) _queryParameterName = queryParameterName;
if (ignoredHostLabels != null) {
_ignoredHostLabels = ignoredHostLabels
.map((String label) => label.toLowerCase())
.toSet();
}
if (resolver != null) _resolver = resolver;
}