We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Client
PubSub
Environment
MacOS
Go Environment
$ go version go version go1.22.2 darwin/arm64
$ go env GO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/tomoki.t/Library/Caches/go-build' GOENV='/Users/tomoki.t/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/tomoki.t/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/tomoki.t/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/Cellar/go/1.22.2/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.2/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.22.2' GCCGO='gccgo' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='/dev/null' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/d5/bmk880x11pz8xh80bh9djr3m0000gn/T/go-build1444610399=/tmp/go-build -gno-record-gcc-switches -fno-common'
Code
e.g.
func main() { os.Setenv("PUBSUB_EMULATOR_HOST", "localhost:8085") ctx := context.Background() client, err := pubsub.NewClient( ctx, "foo-project", option.WithGRPCDialOption( grpc.WithChainUnaryInterceptor(func(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { fmt.Println("grpc.WithChainUnaryInterceptor") return invoker(ctx, method, req, reply, cc, opts...) }), ), ) if err != nil { panic(err) } defer client.Close() topic := client.Topic("foo-topic") result := topic.Publish(ctx, &pubsub.Message{ Data: []byte("Hello, World!"), }) if _, err := result.Get(ctx); err != nil { panic(err) } }
Expected behavior
Expected to see output from the grpc.WithChainUnaryInterceptor indicating that the interceptor is being called.
Actual behavior
No output from the interceptor is observed, suggesting it's not being called.
Additional context
When PUBSUB_EMULATOR_HOST is set, a gRPC connection is generated using only grpc.WithInsecure, which results in all gRPC DialOptions being ignored.
google-cloud-go/pubsub/pubsub.go
Lines 142 to 151 in 4d85153
The text was updated successfully, but these errors were encountered:
Thank for you the PR and your patience while I get this merged in. Will try to get this merged in this week.
Sorry, something went wrong.
hongalex
Successfully merging a pull request may close this issue.
Client
PubSub
Environment
MacOS
Go Environment
Code
e.g.
Expected behavior
Expected to see output from the grpc.WithChainUnaryInterceptor indicating that the interceptor is being called.
Actual behavior
No output from the interceptor is observed, suggesting it's not being called.
Additional context
When PUBSUB_EMULATOR_HOST is set, a gRPC connection is generated using only grpc.WithInsecure, which results in all gRPC DialOptions being ignored.
google-cloud-go/pubsub/pubsub.go
Lines 142 to 151 in 4d85153
The text was updated successfully, but these errors were encountered: