-
Notifications
You must be signed in to change notification settings - Fork 4k
Introduce io.grpc.Uri. #12535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce io.grpc.Uri. #12535
Conversation
io.grpc.Uri is an implementation of RFC 3986 tailored for grpc-java's needs. It lifts some of the limitations of java.net.URI that currently prevent us from resolving target URIs like intent:#Intent;...
ejona86
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice. It's slightly strange you can't create a builder directly, but that'd just have you do Uri.create("myscheme:").toBuilder(), which seems pretty clear and guarantees there is a scheme.
Thanks! Actually the Builder() ctor is public. My intention is for users to write code like: Maybe there should be a public static newBuilder() method instead to match Attributes and CreateSubchannelArgs and MethodDescriptor ... ? |
For consistency with the builder pattern elsewhere in grpc-java
|
Ah, I see. Yeah, it would match our other APIs more to have a |
io.grpc.Uriis an implementation of RFC 3986 tailored for grpc-java's needs. It lifts some of the limitations ofjava.net.URIthat currently prevent us from resolving target URIs likeintent:#Intent;...See #12244 for more.Marked
@Internalfor now but the plan is to eventually use this to replacejava.net.URIin our public APIs such as NameResolver.Factory.