新增对ServiceConfig配置的支持
1.新增之后需要进行如下所示的配置
grpc.client.tcl-cloud-provider.retry-enabled=true grpc.client.tcl-cloud-provider.method-config[0].name[0].service=helloworld.Greeter grpc.client.tcl-cloud-provider.method-config[0].name[0].method=SayHello grpc.client.tcl-cloud-provider.method-config[0].retry-policy.max-attempts=3 grpc.client.tcl-cloud-provider.method-config[0].retry-policy.initial-backoff=1 grpc.client.tcl-cloud-provider.method-config[0].retry-policy.max-backoff=1 grpc.client.tcl-cloud-provider.method-config[0].retry-policy.backoff-multiplier=2 grpc.client.tcl-cloud-provider.method-config[0].retry-policy.retryable-status-codes=UNKNOWN,UNAVAILABLE
2.测试结果如下

EDIT by @ST-DDT
References:
- https://github.com/grpc/proposal/blob/master/A6-client-retries.md
- https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/internal/RetryPolicy.java
Thanks for your contribution.
There are some small changes I would like to see before merging this. See my comments for details. Also please run
./gradle spotlessApplybefore committing. Lastly, please add a test that ensures this works as expected and does not break unnoticed in a future release.If you need help with any of these, feel free to ask me and I will try to help you.
I have settled your proposal and also add GrpcChannelPropertiesGivenMethodConfigUnitTest for test
I'll try to add some integration tests that actually test, that the retry/service config is working. Maybe I can also tweak the datatypes a bit to simplify the configuration some more.
I'll try to add some integration tests that actually test, that the retry/service config is working. Maybe I can also tweak the datatypes a bit to simplify the configuration some more.
Ok just do it