Reference documentation and code samples for the Google Cloud Network Services V1 Client class Destination.
The destination to which traffic will be routed.
Generated from protobuf message google.cloud.networkservices.v1.GrpcRoute.Destination
Namespace
Google \ Cloud \ NetworkServices \ V1 \ GrpcRouteMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ service_name |
string
Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService. |
↳ weight |
int
Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them. |
getServiceName
Required. The URL of a destination service to which to route traffic.
Must refer to either a BackendService or ServiceDirectoryService.
Returns | |
---|---|
Type | Description |
string |
hasServiceName
setServiceName
Required. The URL of a destination service to which to route traffic.
Must refer to either a BackendService or ServiceDirectoryService.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getWeight
Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as:
- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
Returns | |
---|---|
Type | Description |
int |
hasWeight
clearWeight
setWeight
Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as:
- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getDestinationType
Returns | |
---|---|
Type | Description |
string |