MCPcopy Create free account
hub / github.com/grpc/grpc-java / starting

Method starting

xds/src/test/java/io/grpc/xds/DataPlaneRule.java:83–104  ·  view source on GitHub ↗
(Description description)

Source from the content-addressed store, hash-verified

81 }
82
83 @Override
84 protected void starting(Description description) {
85 // Let the control plane know about our new server.
86 controlPlane.setLdsConfig(ControlPlaneRule.buildServerListener(),
87 ControlPlaneRule.buildClientListener(SERVER_HOST_NAME)
88 );
89
90 // Start up the server.
91 try {
92 startServer(controlPlane.defaultBootstrapOverride());
93 } catch (Exception e) {
94 throw new AssertionError("unable to start the data plane server", e);
95 }
96
97 // Provide the rest of the configuration to the control plane.
98 controlPlane.setRdsConfig(ControlPlaneRule.buildRouteConfiguration(SERVER_HOST_NAME));
99 controlPlane.setCdsConfig(ControlPlaneRule.buildCluster());
100 InetSocketAddress edsInetSocketAddress = (InetSocketAddress) server.getListenSockets().get(0);
101 controlPlane.setEdsConfig(
102 ControlPlaneRule.buildClusterLoadAssignment(edsInetSocketAddress.getHostName(),
103 ENDPOINT_HOST_NAME, edsInetSocketAddress.getPort()));
104 }
105
106 @Override
107 protected void finished(Description description) {

Callers

nothing calls this directly

Calls 14

buildServerListenerMethod · 0.95
buildClientListenerMethod · 0.95
startServerMethod · 0.95
buildClusterMethod · 0.95
setLdsConfigMethod · 0.80
setRdsConfigMethod · 0.80
setCdsConfigMethod · 0.80
setEdsConfigMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected