You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Selector middleware works for unary, server streaming . but it doesn't work in case of "bidirectional streaming rpc". I was using grpcurl commandline utility which by default uses bidirectional streaming rpc.
operation := info.Operation()
value of the operation in case of grpc would give grpc.reflection.v1.ServerReflection/ServerReflectionInfo
which doesn't give info about method called.
Environment:
Kratos version (use kratos -v): v2.7.3
Go version (use go version): 1.21
OS (e.g: cat /etc/os-release): Darwin
Others:
The text was updated successfully, but these errors were encountered:
@akoserwalgrpc.reflection.v1.ServerReflection/ServerReflectionInfo is a streaming RPC that has been previously discussed and cannot be overwritten by middleware at this time. I will also carefully review the previous communication recently.
What happened:
As shown for HTTP middleware the
selector
middleware works, but not the case with grpchttps://github.com/go-kratos/beer-shop/blob/a29eae57a9baeae9969e9a7d418ff677cf494a21/app/shop/interface/internal/server/http.go#L41
How to reproduce it (as minimally and precisely as possible):
Adding selector middleware as shown https://github.com/go-kratos/beer-shop/blob/a29eae57a9baeae9969e9a7d418ff677cf494a21/app/shop/interface/internal/server/http.go#L41
for grpc middleware
Anything else we need to know?:
https://github.com/go-kratos/kratos/blob/main/middleware/selector/selector.go#L92
Selector middleware works for unary, server streaming . but it doesn't work in case of "bidirectional streaming rpc". I was using grpcurl commandline utility which by default uses bidirectional streaming rpc.
operation := info.Operation()
value of the operation in case of grpc would give
grpc.reflection.v1.ServerReflection/ServerReflectionInfo
which doesn't give info about method called.
Environment:
kratos -v
): v2.7.3go version
): 1.21cat /etc/os-release
): DarwinThe text was updated successfully, but these errors were encountered: