Skip to content

Commit

Permalink
enable grpc server reflection
Browse files Browse the repository at this point in the history
Signed-off-by: John Pedrie <[email protected]>
  • Loading branch information
jdpedrie committed Oct 30, 2024
1 parent 0eb6110 commit 52998a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions API/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
<version>${grpc.version}</version>
</dependency>

</dependencies>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package crawlercommons.urlfrontier.service;

import crawlercommons.urlfrontier.service.rocksdb.RocksDBService;
import io.grpc.protobuf.services.ProtoReflectionService;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.prometheus.client.exporter.HTTPServer;
Expand Down Expand Up @@ -170,7 +171,10 @@ public void start() throws Exception {
}
}

this.server = ServerBuilder.forPort(port).addService(service).build();
this.server = ServerBuilder.forPort(port)
.addService(service)
.addService(ProtoReflectionService.newInstance())
.build();
server.start();
LOG.info(
"Started URLFrontierServer [{}] on port {} as {}",
Expand Down

0 comments on commit 52998a8

Please sign in to comment.