gRPC plugin for the Egg.js framework (version 1.0.3). Integrates gRPC client functionality into Egg applications by automatically loading protocol buffer files from a configurable directory, attaching service stubs to ctx and app objects. Supports proto file discovery, name conversion between protobuf conventions and JavaScript, and unary RPC calls. Requires Egg.js and gRPC dependencies. Last updated in 2018 and appears to be in maintenance mode with no recent activity.
npm install egg-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to enable the plugin, configure endpoint, and make a unary gRPC call from a controller using the client attached to ctx.
Switch to a more modern gRPC plugin or adjust the plugin to use @grpc/grpc-js.
If you need @grpc/grpc-js, you must fork or rewrite the plugin.
Use the package name as defined in .proto files, not the file path.
For service ShowCase, access as ctx.grpc.egg.share.showCase, not ShowCase.
Use ctx.grpc for making RPC calls, not app.grpc.
npm install grpc --save (note: grpc is deprecated).
Ensure config/plugin.js has exports.grpc = { enable: true, package: 'egg-grpc' } and the package is installed.Create the directory or update the config to point to an existing directory.