rebase: grpc_middleware.WithUnaryServerChain is deprecated

golangci-lint reports that `grpc_middleware.WithUnaryServerChain` is
deprecated and `google.golang.org/grpc.ChainUnaryInterceptor` should be
used instead.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2023-05-09 09:54:10 +02:00 committed by mergify[bot]
parent 257ce599f7
commit 3d489781a0

View File

@ -118,7 +118,7 @@ func NewMiddlewareServerOption(withMetrics bool) grpc.ServerOption {
middleWare = append(middleWare, grpc_prometheus.UnaryServerInterceptor)
}
return grpc_middleware.WithUnaryServerChain(middleWare...)
return grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(middleWare...))
}
func getReqID(req interface{}) string {