-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: add support for new setAllowHardBoundTokens field. #3467
Changes from 2 commits
09eb2b2
db51f4e
fd1015e
960084d
ddb3b79
60dafd0
e193cc9
0e40f22
6a27af6
591ef68
90a32af
a7f8384
4fe44cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
import com.google.api.core.InternalExtensionOnly; | ||
import com.google.auth.Credentials; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Map; | ||
import java.util.concurrent.Executor; | ||
import java.util.concurrent.ScheduledExecutorService; | ||
|
@@ -97,6 +98,9 @@ public interface TransportChannelProvider { | |
*/ | ||
TransportChannelProvider withEndpoint(String endpoint); | ||
|
||
/** Sets the allowed hard bound token types. */ | ||
TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this field is going to be only used by gRPC transport per the internal doc? And the teams that would use it are all handwritten libraries? If that's the case, I think they are likely going to initialize an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That is correct, hard bound tokens is only for gRPC.
I think this will work since I believe the libraries separate their logic for HTTP and gRPC, so they don't end up using the interface @rockspore can you confirm that the places you want to use this setting are using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For Cloud Spanner, I found this so it seems to be the case too, although I don't see where it gets called by default. So yeah it should be good if we only do this in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rockspore The link you referred to is a generated default instance of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the details! It makes perfect sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks all for the discussion! Done in 60dafd0 |
||
|
||
/** | ||
* Reports whether this provider allows pool size customization. | ||
* | ||
|
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.
Should this variable name be more specific? Reading it alone doesn't tell you where these values will be used.
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.
Thanks for calling this out! I updated this variable name to
allowedHardBoundTokenTypes
, WDYT?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.
LGTM. Thanks.