rpc_dart_grpc_reflection 0.2.3 copy "rpc_dart_grpc_reflection: ^0.2.3" to clipboard
rpc_dart_grpc_reflection: ^0.2.3 copied to clipboard

gRPC Server Reflection (v1 + v1alpha) for rpc_dart. Allows grpcurl, Postman, and other gRPC tools to discover services registered on any rpc_dart endpoint.

rpc_dart_grpc_reflection #

gRPC Server Reflection (v1 and v1alpha) for rpc_dart, so grpcurl, Postman and other gRPC tooling can discover the services registered on an endpoint.

  • ServerReflectionContract — the responder contract to register on an endpoint.
  • RpcReflectionRegistry — holds the FileDescriptorProto bytes to serve.
  • Descriptor builders (RpcMessageDescriptor, RpcMethodDescriptor, ...) for hand-written schemas; rpc_dart_generator can emit the same bytes from an annotated contract.

Usage #

import 'package:rpc_dart_grpc_reflection/rpc_dart_grpc_reflection.dart';

final registry = RpcReflectionRegistry()..addFileDescriptor(descriptorBytes);
responderEndpoint.registerServiceContract(ServerReflectionContract(registry));

Caveat #

Reflection describes a protobuf schema. It is only truthful when the payloads on the wire really are protobuf — i.e. when the contract uses RpcBinaryCodec with protoc-generated messages. With the default CBOR codec the descriptors are advisory: tools will list and describe the service, but cannot decode the payloads.

0
likes
150
points
80
downloads

Documentation

API reference

Publisher

verified publisherrpc.nogipx.dev

Weekly Downloads

gRPC Server Reflection (v1 + v1alpha) for rpc_dart. Allows grpcurl, Postman, and other gRPC tools to discover services registered on any rpc_dart endpoint.

Homepage
Repository (GitHub)
View/report issues

Topics

#rpc #grpc #reflection

License

MIT (license)

Dependencies

rpc_dart

More

Packages that depend on rpc_dart_grpc_reflection