HTTPRouteDestination class
Each routing rule is associated with one or more service versions (see glossary in beginning of document). Weights associated with the version determine the proportion of traffic it receives. For example, the following rule will route 25% of traffic for the “reviews” service to instances with the “v2” tag and the remaining traffic (i.e., 75%) to “v1”.
Constructors
- HTTPRouteDestination({required Destination destination, int? weight, Headers? headers})
-
The main constructor.
const
-
HTTPRouteDestination.fromJson(Map<
String, dynamic> json) - Creates a HTTPRouteDestination from JSON data.
Properties
- destination → Destination
-
Destination uniquely identifies the instances of a service to which the request/connection
should be forwarded to.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → Headers?
-
Header manipulation rules.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- weight → int?
-
The proportion of traffic to be forwarded to the service version. (0-100).
Sum of weights across destinations SHOULD BE == 100. If there is only one destination in a rule,
the weight value is assumed to be 100.
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