A Node.js module (v1.0.1, updated Aug 2022, infrequent releases) extending gRPC with Google Cloud Platform-specific features like channel pooling and affinity-based routing. It provides a GcpApiConfig from a JSON definition, a custom channel factory override, and a call invocation transformer to enable features such as BIND/BOUND/UNBIND affinity commands. Works with both 'grpc' and '@grpc/grpc-js' packages via a factory pattern. Differentiated by its GCP-specific optimizations over plain gRPC.
npm install grpc-gcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize gRPC-GCP with a GCP API config, then create a Spanner client with channel pool and affinity features.
Use require('grpc-gcp')(grpc) instead of new GrpcGcp().Set channelFactoryOverride: grpcGcp.gcpChannelFactoryOverride, not channelFactoryOverride: grpcGcp.gcpChannelFactoryOverride().
Replace require('grpc') with require('@grpc/grpc-js').Use require('grpc-gcp')(grpc) instead.npm install grpc (or @grpc/grpc-js).