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/CADqAXr6e%3DKA8EmkWx8MGqDv%2BTAtokLVc7niYJ89u2M2cdtgaOw%40mail.gmail.com.

Reply via email to