RouteSpec constructor
RouteSpec({
- String version = 'v1',
- String kind = 'Route',
- required RouteMetadata metadata,
- required String domain,
- required RouteBackend backend,
- List<
RoutePath> paths = const [],
Implementation
RouteSpec({
this.version = 'v1',
this.kind = 'Route',
required this.metadata,
required this.domain,
required this.backend,
List<RoutePath> paths = const [],
}) : paths = List.unmodifiable(paths) {
if (backend.agent != null) {
for (final path in paths) {
if (path.targetContent == null || path.targetPort != null || path.stripPrefix || path.unavailable != null) {
throw ArgumentError('RouteSpec agent paths require targetContent without service options');
}
if (path.targetContent!.iap) {
throw ArgumentError('RouteSpec agent content routes do not support IAP');
}
}
}
}