Re:gRPC: The Ugly Parts
by rollulus on Saturday September 07, 2024 @04:11AM
(#41472349)
The remark about reflection for the Go implementation surprised me. I always treated the generated code as a black box, but occasionally saw their diffs, and assumed the byte blobs to be for clever generated marshalling. If not, what are they used for?
[ Parent
| on HN ]
Re:gRPC: The Ugly Parts
by sudorandom on Saturday September 07, 2024 @05:28AM
(#41472730)
They are the protobuf descriptors, which is basically the protobuf encoded version of the protobuf files. They can be optional and many plugins have options to exclude that part from the generated code. Generally, they're useful for the Server Reflection feature of gRPC and it's used for runtime reflection.
Here's a more complete description of what they are and how they're used: https://buf.build/docs/reference/descriptors.