Server Reflection
You know a server's address, but do not have its .proto files. Reflection lets tools such as grpcurl ask that server for its service and message schemas.
Add it explicitly
With routes containing your service handlers:
typescript
import { createServer } from '@connectum/core';
import { Reflection } from '@connectum/reflection';
const server = createServer({
services: [routes],
allowHTTP1: false,
protocols: [Reflection()],
});After starting this plaintext HTTP/2 server, a reflection client can query it. Restrict reflection exposure in production: the schema itself may be sensitive.
Not the service catalog
The service catalog is generated contract knowledge used by your application. Reflection exposes mounted schema information to external tools at runtime.
Go deeper
Install reflection, run grpcurl and buf curl, and configure exposure.
Find a section from the full guide
The detailed material is preserved on a separate page. Earlier section links still work here.
- Why Use Reflection?
- Installation
- Quick Setup
- How It Works
- Protocol Behavior
- Using grpcurl with Reflection
- List All Services
- Describe a Service
- Describe a Method
- Describe a Message Type
- Call a Method
- With TLS
- Using buf curl with Reflection
- Using Postman / Insomnia / Warthog
- Conditional Reflection
- Adding Reflection at Runtime
- Complete Example
- collectFileProtos Utility
- Protocol Registration Details