grpcc | A gRPC cli interface for easy testing against gRPC servers
kandi X-RAY | grpcc Summary
kandi X-RAY | grpcc Summary
grpcc is a flexible command-line client for any gRPC server for quick and easy testing of APIs. grpcc is written in nodejs but can talk to a gRPC service written in any language.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a client client .
- Print the usage info .
- Init the table .
- Returns a credentials object
- Find an array of service packages .
- Helper function that creates a new socket proxy for a Unix socket .
- Creates metadata .
- Prints error message to console .
- Prepares the client for the given service .
- load variables from table
grpcc Key Features
grpcc Examples and Code Snippets
Community Discussions
Trending Discussions on grpcc
QUESTION
I use traefik as an ingress controller in AKS, I have a grpc service that run correctly locally, but I have some problem behind traefik.
When the GRPC server return an error, I receive it correctly, but when it send a normal response, I didn’t receive it:
...ANSWER
Answered 2019-Feb-08 at 14:21In my Traefik configuration, I use the retry middleware([retry]
) and Traefik v1.7.8 have a bug:
When the retry middleware has already sent the headers, use the original headers map to be able to send trailers.
I manually build the v1.7 branch with this fix and everything works again! Thanks a lot to Containous (Damien and Julien!) for helping to debug this issue!
QUESTION
I'm using grpcc, which is based on protobuf.js, to test my grpc service APIs.
My .proto
file:
ANSWER
Answered 2018-Apr-26 at 23:42The proper json body would be the following:
{ "userId": "my_user_id", "params": { "name": "my_name" } }
What you've tried doing is an array of maps, which doesn't really mean anything in the context of protobuf. A map
is exactly the description of a json object, so more than one value would be represented the following way:
{ "params": { "key1": "value1", "key2": "value2" } }
No need for an array.
QUESTION
I'm having an issue trying to generate a dockerfile for my nodejs app:
My dockerfile:
...ANSWER
Answered 2017-Sep-05 at 19:45What I think is happening is, docker run is copying the local node_modules
from your project inside the container at COPY . /app
.
So thus you get the linux-x64 error. It basically copied all the machine specific code from node_modules to the container that must have another OS. To fix this, ignore node_modules by making a .dockerignore
file alongside your package.json
and add just one line.
node_modules
Read more about it from here.
QUESTION
I'm wondering how I can get authentication setup on my gRPC service? I've read that metadata is the way to go.
Using the Node.js grpc library and grpcc to test my implementation. I basically have a JWT token being received on every request, just no way to digest and validate it over the gRPC pipe.
Suggestions/guidance is most appreciated.
...ANSWER
Answered 2017-May-31 at 00:45Node gRPC does not currently expose functionality to process authentication tokens on the server. The token should show up with the rest of the metadata on the server, but you will have to process it on your own.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install grpcc
client - this is the gRPC client connection to your service. The usage instructions will show the available methods, as will using tab completion by typing client.<tab>
printReply - a convenience callback for printing the response of an RPC call (nicer than console.log) (alias: pr)
streamReply - a convenience callback for printing the response of an stream's 'data' event (nicer than console.log) (alias: cr)
createMetadata - a convenience function for converting plain javascript objects to gRPC metadata (alias: cm)
printMetadata - a convenience callback for printing the metadata of an RPC call (nicer than console.log) (alias: pm)
All calls require an argument matching the spec, so if you have an empty message type in your proto for some calls, you'll be sending in {} as the first argument to those calls
Remember that Protobuf.js will camelCase class and property names
Unary calls can take a callback as the second argument which has the signature function(err, reply). reply will be an object matching the message type as per your proto
For streaming calls, you'll want to use the EventEmitter object that is returned when the call is made and connect to the appropriate events. Note the grpc nodejs docs are out of date, check out the examples to see how to work with streams.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page