Implement/service config#2731
Conversation
29c707f to
52589c3
Compare
TAG=agy CONV=5f23221a-0150-4021-ad9c-111618d24771
dfawley
left a comment
There was a problem hiding this comment.
Thanks for the updates. The Duration stuff LGTM; glad we can do this without needing to annotate every instance of the field individually.
|
|
||
| #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] | ||
| pub(crate) struct MethodNameSerDe { | ||
| pub(crate) service: String, |
There was a problem hiding this comment.
Should literally every field be in an Option<>? Or what is the failure mode supposed to be if a single field fails to parse?
There was a problem hiding this comment.
If deserialization fails, it should return an Error, which will be bubbled up appropriately. Probably better to fail here directly I think?
There was a problem hiding this comment.
I think I looked at everything, and I think this the only problem. It is valid to have a fully empty method_config.name. See this example:
However, if service is unset, then we must validate that method is also unset.
f668c82 to
d24c2ef
Compare
Motivation
ServiceConfig requires an internal representation that we can de/serialize.
Solution
This CL implements the ServiceConfig struct and necessary plumbing for de/serialization. In a follow-on CL(s) we will be adding the plumbing to fully utilize the ServiceConfig, including adding the option to the
Channelbuilde, passing it to the load balancer tree for utilization, and interactions with the Name Resolver.Notes