-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
bufnet not supported by NewClient() ? #7091
Comments
Default resolver is now dns with NewClient, was passthrough With WithResolvers ? |
From DialContext 1.63.0 doc :
|
Thanks for the feedback @SLoeuillet! I've gave a check to Ideally, I'd pass a passthrough's Builder in order to get the original behavior. grpc-go/resolver/passthrough/passthrough.go Lines 24 to 26 in c68f456
Initially, I also checked if I could set the defaultScheme to Lines 662 to 668 in c68f456
The only workaround I think of would be to copy the passthrough implementation, so I can pass it to As of now, in order to upgrade grpc-go to Is it intended by the grpc-go developer team? Is there an alternative? Thanks! |
You can specify the passthrough resolver by using Or you can globally make the default resolver "passthrough" by using https://pkg.go.dev/google.golang.org/grpc/resolver#SetDefaultScheme -- I do not recommend this approach, though, as "passthrough" has some negative properties and really only exists for backward compatibility reasons. You can also feel free to keep using Ideally we will eventually add support for an "in-memory" transport for your exact use case. However, that does not currently exist. That would probably require something like #906 which we just don't have the resources to prioritize. |
Oh awesome! It works like a charm! |
With the v1.63.0 release, I tried to migrate code that uses the, now deprected,
DialContext
function toNewClient()
.However, when using
NewClient
with thebufnet
protocol (https://pkg.go.dev/google.golang.org/grpc/test/bufconn), my test fails.Here's the change:
The test fails with:
How can I use
bufnet
with theNewClient
function?The text was updated successfully, but these errors were encountered: