Skip to content

Connectum API Reference / @connectum/cli / utils/reflection / fetchReflectionData

Function: fetchReflectionData()

fetchReflectionData(url): Promise<ReflectionResult>

Defined in: utils/reflection.ts:42

Fetch service and file descriptor information from a running server via reflection.

Uses gRPC Server Reflection Protocol (v1 with v1alpha fallback).

Parameters

url

string

Server URL (e.g., "http://localhost:5000")

Returns

Promise<ReflectionResult>

ReflectionResult with services, registry, and file names

Example

typescript
const result = await fetchReflectionData("http://localhost:5000");
console.log(result.services); // ["grpc.health.v1.Health", ...]