Skip to content

Commit 9a4be6c

Browse files
committed
Add proto extension for Wrr LB to pretty printing code.
1 parent 16d2672 commit 9a4be6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xds/src/main/java/io/grpc/xds/MessagePrinter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import io.envoyproxy.envoy.extensions.filters.http.rbac.v3.RBACPerRoute;
3333
import io.envoyproxy.envoy.extensions.filters.http.router.v3.Router;
3434
import io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager;
35+
import io.envoyproxy.envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality;
3536
import io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext;
3637
import io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext;
3738
import io.grpc.xds.client.MessagePrettyPrinter;
@@ -52,7 +53,7 @@ private static class LazyHolder {
5253
private static JsonFormat.Printer newPrinter() {
5354
TypeRegistry.Builder registry =
5455
TypeRegistry.newBuilder()
55-
.add(Listener.getDescriptor())
56+
.addmak(Listener.getDescriptor())
5657
.add(HttpConnectionManager.getDescriptor())
5758
.add(HTTPFault.getDescriptor())
5859
.add(RBAC.getDescriptor())
@@ -65,7 +66,8 @@ private static JsonFormat.Printer newPrinter() {
6566
.add(RouteConfiguration.getDescriptor())
6667
.add(Cluster.getDescriptor())
6768
.add(ClusterConfig.getDescriptor())
68-
.add(ClusterLoadAssignment.getDescriptor());
69+
.add(ClusterLoadAssignment.getDescriptor())
70+
.add(WrrLocality.getDescriptor());
6971
try {
7072
@SuppressWarnings("unchecked")
7173
Class<? extends Message> routeLookupClusterSpecifierClass =

0 commit comments

Comments
 (0)