Skip to content

Commit

Permalink
Issue grpc#6724 to create a V1 reflection service.
Browse files Browse the repository at this point in the history
Changes still in progress on the proto field mapping.
  • Loading branch information
kannanjgithub committed May 22, 2024
1 parent 569b426 commit a002bc2
Show file tree
Hide file tree
Showing 8 changed files with 756 additions and 524 deletions.
4 changes: 2 additions & 2 deletions documentation/server-reflection-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ proto-based services.
## Enable Server Reflection

gRPC-Java Server Reflection is implemented by
`io.grpc.protobuf.services.ProtoReflectionService` in the `grpc-services`
`io.grpc.protobuf.services.ProtoReflectionServiceV1` in the `grpc-services`
package. To enable server reflection, you need to add the
`ProtoReflectionService` to your gRPC server.

Expand All @@ -35,7 +35,7 @@ need to make the following changes:

import io.grpc.Server;
import io.grpc.ServerBuilder;
+import io.grpc.protobuf.services.ProtoReflectionService;
+import io.grpc.protobuf.services.ProtoReflectionServiceV1;
import io.grpc.stub.StreamObserver;
import java.io.IOException;
import java.util.logging.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.Server;
import io.grpc.Status;
import io.grpc.protobuf.services.ProtoReflectionService;
import io.grpc.protobuf.services.ProtoReflectionServiceV1;
import io.grpc.services.AdminInterface;
import io.grpc.stub.StreamObserver;
import io.grpc.testing.integration.Messages.ClientConfigureRequest;
Expand Down Expand Up @@ -245,7 +245,7 @@ private void run() {
Grpc.newServerBuilderForPort(statsPort, InsecureServerCredentials.create())
.addService(new XdsStatsImpl())
.addService(new ConfigureUpdateServiceImpl())
.addService(ProtoReflectionService.newInstance())
.addService(ProtoReflectionServiceV1.newInstance())
.addServices(AdminInterface.getStandardServices())
.build();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import io.grpc.Status;
import io.grpc.health.v1.HealthCheckResponse.ServingStatus;
import io.grpc.protobuf.services.HealthStatusManager;
import io.grpc.protobuf.services.ProtoReflectionService;
import io.grpc.protobuf.services.ProtoReflectionServiceV1;
import io.grpc.services.AdminInterface;
import io.grpc.stub.StreamObserver;
import io.grpc.testing.integration.Messages.SimpleRequest;
Expand Down Expand Up @@ -180,7 +180,7 @@ private void start() throws Exception {
Grpc.newServerBuilderForPort(maintenancePort, InsecureServerCredentials.create())
.addService(new XdsUpdateHealthServiceImpl(health))
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addService(ProtoReflectionServiceV1.newInstance())
.addServices(AdminInterface.getStandardServices())
.build();
maintenanceServer.start();
Expand All @@ -200,7 +200,7 @@ private void start() throws Exception {
new TestServiceImpl(serverId, host), new TestInfoInterceptor(host)))
.addService(new XdsUpdateHealthServiceImpl(health))
.addService(health.getHealthService())
.addService(ProtoReflectionService.newInstance())
.addService(ProtoReflectionServiceV1.newInstance())
.addServices(AdminInterface.getStandardServices())
.build();
server.start();
Expand Down
Loading

0 comments on commit a002bc2

Please sign in to comment.