VirtualServiceSpec class

Configuration affecting traffic routing.

Constructors

VirtualServiceSpec({List<String>? hosts, List<String>? gateways, List<HTTPRoute>? http, List<TLSRoute>? tls, List<TCPRoute>? tcp, List<String>? exportTo})
The main constructor.
const
VirtualServiceSpec.fromJson(Map<String, dynamic> json)
Creates a VirtualServiceSpec from JSON data.

Properties

exportTo List<String>?
A list of namespaces to which this virtual service is exported. Exporting a virtual service allows it to be used by sidecars and gateways defined in other namespaces. This feature provides a mechanism for service owners and mesh administrators to control the visibility of virtual services across namespace boundaries.
final
gateways List<String>?
The names of gateways and sidecars that should apply these routes. Gateways in other namespaces may be referred to by
final
hashCode int
The hash code for this object.
no setterinherited
hosts List<String>?
The destination hosts to which traffic is being sent. Could be a DNS name with wildcard prefix or an IP address. Depending on the platform, short-names can also be used instead of a FQDN (i.e. has no dots in the name). In such a scenario, the FQDN of the host would be derived based on the underlying platform.
final
http List<HTTPRoute>?
An ordered list of route rules for HTTP traffic. HTTP routes will be applied to platform service ports named ‘http-’/‘http2-’/‘grpc-*’, gateway ports with protocol HTTP/HTTP2/GRPC/ TLS-terminated-HTTPS and service entry ports using HTTP/HTTP2/GRPC protocols. The first rule matching an incoming request is used.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tcp List<TCPRoute>?
An ordered list of route rules for opaque TCP traffic. TCP routes will be applied to any port that is not a HTTP or TLS port. The first rule matching an incoming request is used.
final
tls List<TLSRoute>?
An ordered list of route rule for non-terminated TLS & HTTPS traffic. Routing is typically performed using the SNI value presented by the ClientHello message. TLS routes will be applied to platform service ports named ‘https-’, ‘tls-’, unterminated gateway ports using HTTPS/TLS protocols (i.e. with “passthrough” TLS mode) and service entry ports using HTTPS/TLS protocols. The first rule matching an incoming request is used. NOTE: Traffic ‘https-’ or ‘tls-’ ports without associated virtual service will be treated as opaque TCP traffic.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited