Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-node-server-reflection

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-node-server-reflection

gRPC Node Server Reflection implementation

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
831
decreased by-24.66%
Maintainers
1
Weekly downloads
 
Created
Source

gRPC NodeJS Server Reflection

This package adds Server Reflection support to your @grpc/grpc-js servers.

Installation

npm:

npm install grpc-node-server-reflection

yarn:

yarn add grpc-node-server-reflection

How to use

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 );
}

Support Status

Current Support by Server Reflection Request type:

TypeDescriptionSupported
ListServicesList the full names of registered services:heavy_check_mark:
FileContainingSymbolFind the proto file that declares the given fully-qualified symbol name.:heavy_check_mark:
FileByFilenameFind a proto file by the file name.:x:
FileContainingExtensionFind the proto file which defines an extension extending the given message type with the given field number.:x:

FAQs

Package last updated on 23 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc