That makes sense and that's where I looked first. However I didn't find the faculty to load a proto / pb.go file in that library.
As far as I can tell the intention of dynamicpb is to be able to create dynamic messages, I don't see the faculty for loading a fileDescriptor from a proto / pb.go file in that library. > This lets you operate on a message type whose descriptor you access at runtime. Where in the API (for any language) is the call to load a descriptor dynamically? I'm looking here right now: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoregistry#Files.RegisterFile and wondering if this is the method I'd be looking for. Thank you for taking the time to reply! Gary On Thursday, October 1, 2020 at 10:13:25 AM UTC-7 [email protected] wrote: > I'm not very familiar at all with the Go protobuf implementation but in > other languages we usually call this feature DynamicMessage. This lets you > operate on a message type whose descriptor you access at runtime, without > having to know about it at build time. I think this is probably the Go > equivalent: https://pkg.go.dev/google.golang.org/protobuf/types/dynamicpb > > On Wed, Sep 30, 2020 at 3:52 PM Gary Lucas <[email protected]> > wrote: > >> We're using protocol buffers primarily as the schemas in a schema >> registry. >> >> For most of our components including a given version of schema as a >> library import makes sense. >> >> However for a handful of our components (specifically our data lake >> loading components) it would be advantageous to load assets dynamically. >> I'm reasonably sure that there is a way to do so, but the methods are >> eluding me in the go library. In terms of loading data, we don't really >> care about the schema of the data other than validating that it conforms to >> the given schema. >> >> Can someone elaborate if it's possible to dynamically load a proto / >> pb.go file rather than importing the generated assets? >> >> Thanks! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/protobuf/7ebc8ddc-7b16-4255-9a19-4e789575785bn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/protobuf/7ebc8ddc-7b16-4255-9a19-4e789575785bn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/81b42e9a-d684-4ab7-8abb-9a2be4ba675cn%40googlegroups.com.
