Skip to content

Commit

Permalink
Use ClusterInfo from streaminfo to get clustername too (envoyproxy#189)
Browse files Browse the repository at this point in the history
Signed-off-by: gargnupur <[email protected]>

Remove files

Signed-off-by: gargnupur <[email protected]>
  • Loading branch information
gargnupur authored Mar 21, 2020
1 parent 98e5945 commit ab0b214
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/extensions/common/wasm/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ Context::FindValue(absl::string_view name, Protobuf::Arena* arena) const {
return CelValue::CreateString(&info->upstreamHost()->cluster().name());
} else if (info && info->routeEntry()) {
return CelValue::CreateString(&info->routeEntry()->clusterName());
} else if (info && info->upstreamClusterInfo().has_value() &&
info->upstreamClusterInfo().value()) {
return CelValue::CreateString(&info->upstreamClusterInfo().value()->name());
}
break;
case PropertyToken::CLUSTER_METADATA:
Expand Down

0 comments on commit ab0b214

Please sign in to comment.