You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thanks for this library, it has saved me a lot of time building Envoy's protos. I have an issue though related to the lack of generic support. It seems like the original protos are not correct in Envoy so I am stuck on how to achieve something like the following.
varresponse=newDiscoveryResponse();varcluster=newCluster();response.Resources.Add(cluster);// Error, Cannot convert from Cluster to WellKnownTypes.Any
I understand the error, since Resources is defined as RepeatedField whereas Cluster does not inherit from anything. This seems strange since I would expect either that Cluster inherits Any so it can be used in the "Object/Any" repeated field or otherwise, I'm not sure if protobuf supports generics so that DiscoveryResponse in the method e.g. ClusterDiscoveryServiceBase is generic like:
Firstly, thanks for this library, it has saved me a lot of time building Envoy's protos. I have an issue though related to the lack of generic support. It seems like the original protos are not correct in Envoy so I am stuck on how to achieve something like the following.
I understand the error, since Resources is defined as RepeatedField whereas Cluster does not inherit from anything. This seems strange since I would expect either that Cluster inherits Any so it can be used in the "Object/Any" repeated field or otherwise, I'm not sure if protobuf supports generics so that
DiscoveryResponse
in the method e.g.ClusterDiscoveryServiceBase
is generic like:So that the repeated field resources is of T rather than Any. Do you know what I am doing wrong here?
The text was updated successfully, but these errors were encountered: