Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
grpc-node-server-reflection
Advanced tools
This package adds Server Reflection support to your @grpc/grpc-js
servers.
npm install grpc-node-server-reflection
yarn add grpc-node-server-reflection
To add the server reflection service pass your gRPC Server instance to the provided wrapServerWithReflection
.
import * as grpc from '@grpc/grpc-js';
import wrapServerWithReflection from 'grpc-node-server-reflection';
// This wraps the instance of gRPC server with the Server Reflection service and returns it.
const server = wrapServerWithReflection(new grpc.Server());
// Since the wrapped server intercepts the `addService` method to keep track
// of all services added to the server make sure to add your services after
// wrapping your instance of the gRPC Server.
server.addService(...);
After wrapping your server you should now be able to rely on server reflection:
$ grpcurl -plaintext localhost:8080 list
grpc.reflection.v1alpha.ServerReflection
example.ExampleService
$ grpcurl -plaintext localhost:8080 describe grpc.reflection.v1alpha.ServerReflection
grpc.reflection.v1alpha.ServerReflection is a service:
service ServerReflection {
rpc ServerReflectionInfo ( stream .grpc.reflection.v1alpha.ServerReflectionRequest ) returns ( stream .grpc.reflection.v1alpha.ServerReflectionResponse );
}
Current Support by Server Reflection Request type:
Type | Description | Supported |
---|---|---|
ListServices | List the full names of registered services | :heavy_check_mark: |
FileContainingSymbol | Find the proto file that declares the given fully-qualified symbol name. | :heavy_check_mark: |
FileByFilename | Find a proto file by the file name. | :x: |
FileContainingExtension | Find the proto file which defines an extension extending the given message type with the given field number. | :x: |
FAQs
gRPC Node Server Reflection implementation
The npm package grpc-node-server-reflection receives a total of 1,958 weekly downloads. As such, grpc-node-server-reflection popularity was classified as popular.
We found that grpc-node-server-reflection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.