grpcurl | Like cURL , but for gRPC : Command-line tool

 by   fullstorydev Go Version: v1.8.7 License: MIT

kandi X-RAY | grpcurl Summary

kandi X-RAY | grpcurl Summary

grpcurl is a Go library typically used in Web Services applications. grpcurl has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

grpcurl is a command-line tool that lets you interact with gRPC servers. It's basically curl for gRPC servers. The main purpose for this tool is to invoke RPC methods on a gRPC server from the command-line. gRPC servers use a binary encoding on the wire (protocol buffers, or "protobufs" for short). So they are basically impossible to interact with using regular curl (and older versions of curl that do not support HTTP/2 are of course non-starters). This program accepts messages using JSON encoding, which is much more friendly for both humans and scripts. With this tool you can also browse the schema for gRPC services, either by querying a server that supports server reflection, by reading proto source files, or by loading in compiled "protoset" files (files that contain encoded file descriptor protos). In fact, the way the tool transforms JSON request data into a binary encoded protobuf is using that very same schema. So, if the server you interact with does not support reflection, you will either need the proto source files that define the service or need protoset files that grpcurl can use. This repo also provides a library package, github.com/fullstorydev/grpcurl, that has functions for simplifying the construction of other command-line tools that dynamically invoke gRPC endpoints. This code is a great example of how to use the various packages of the protoreflect library, and shows off what they can do. See also the grpcurl talk at GopherCon 2018.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              grpcurl has a medium active ecosystem.
              It has 8740 star(s) with 435 fork(s). There are 58 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 72 open issues and 131 have been closed. On average issues are closed in 125 days. There are 11 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of grpcurl is v1.8.7

            kandi-Quality Quality

              grpcurl has 0 bugs and 0 code smells.

            kandi-Security Security

              grpcurl has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              grpcurl code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              grpcurl is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              grpcurl releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 8817 lines of code, 596 functions and 25 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of grpcurl
            Get all kandi verified functions for this library.

            grpcurl Key Features

            No Key Features are available at this moment for grpcurl.

            grpcurl Examples and Code Snippets

            No Code Snippets are available at this moment for grpcurl.

            Community Discussions

            QUESTION

            GRPC on Google Cloud Run : upstream connect error or disconnect/reset before headers. reset reason: remote reset
            Asked 2022-Feb-24 at 08:44

            EDIT

            It seems that my first error I describe is very easy to reproduce. Actually, Google Run fails to run any GRPC query on a .NET5 GRPC server it seems (at least, it did work before but as of today, February 21st, it seems that something changed). To reproduce:

            1. Create a .NET5 GRPC server (also fails with .NET6):
            ...

            ANSWER

            Answered 2022-Feb-24 at 08:44

            It is an actual bug from Envoy and Google Cloud Run. There is a quick fix if you're using .NET6, otherwise it's a bit more hacky. I will just copy here the answer provided by Amanda Tarafa Mas from Google Cloud Platform on the github issue I opened:

            Here are the potential fixes:

            • When using .NET 6 you can set KestrelServerOptions.AllowAlternateSchemes to true.
            • If on a lower .NET version, consider something like GRPC :scheme pseudo-header passed from proxy/loadbalancer causes ConnectionAbortedException dotnet/aspnetcore#30532 (comment). Or consider upgrading to .NET 6.

            What's happening:

            For me setting KestrelServerOptions.AllowAlternate was enough to make my GRPC server work again.

            As @Craig said, you can track the issue here and see if it gets resolved.

            Source https://stackoverflow.com/questions/71207574

            QUESTION

            gRPC generated file doesn't have json definition
            Asked 2021-Dec-19 at 16:44

            I'm trying to generate Go file from proto file but it doesn't have json definition in the method's input definition. Should I add the json definition by myself or there were something wrong with my script. Thank you, I sincerely appreciate your help.

            Proto file

            ...

            ANSWER

            Answered 2021-Dec-19 at 16:44

            Since the error is

            error getting request data: message type RateRequest has no known field named base

            And the json is

            Source https://stackoverflow.com/questions/70413269

            QUESTION

            HTTP/2 client preface string missing or corrupt for C client gRPC using HTTPClient
            Asked 2021-Dec-16 at 23:15

            I am getting "HTTP/2 client preface string missing or corrupt."

            My thoughts are that it has to do with the headers not being set correctly. It is likely the implementation of WifiClient/WifiSecureClient. I've been thinking about this for over several weeks and I'm stuck. Any advice?

            [Updated: Answer below]

            The client was generated using the nanopb protocol buffer compiler:

            ...

            ANSWER

            Answered 2021-Dec-11 at 06:37
            WiFiClient client;
            if (!client.connect(addr, port)) {
            

            Source https://stackoverflow.com/questions/70311138

            QUESTION

            TkInter crashes when called through gRPC
            Asked 2021-Oct-12 at 10:01
            Setup
            • macOS Big Sur
            • Python 3.9.5
            • main dependencies
            ...

            ANSWER

            Answered 2021-Oct-12 at 10:01

            According to this GitHub anwser

            It is likely a macOS-specific threading issue

            On the other hand, according to tkinter's doc. The library may have special event handling logic and threading restrictions, and gRPC Python uses a thread pool to handle incoming requests with gRPC Core handling the IO.

            By digging into that doc, we find

            A Python interpreter may have many threads associated with it. In Tcl, multiple threads can be created, but each thread has a separate Tcl interpreter instance associated with it. Threads can also create more than one interpreter instance, though each interpreter instance can be used only by the one thread that created it.

            Each Tk object created by tkinter contains a Tcl interpreter. It also keeps track of which thread created that interpreter. Calls to tkinter can be made from any Python thread. Internally, if a call comes from a thread other than the one that created the Tk object, an event is posted to the interpreter’s event queue, and when executed, the result is returned to the calling Python thread.

            Although I'm not an expert on platform-specific threading models, I do know that macOS is using a "Grand Central Dispatch" task-queue system that hides away a lot of thread-pool details, which is different from Windows.

            Thus, without digging into gRPC's thread-pool model, I can't say it's safe to call Tkinter widgets, who keep track of thread that create them, from the volatile gRPC's I/O threads.

            Source https://stackoverflow.com/questions/69513599

            QUESTION

            Kubernetes: How to write livenessprobe and readinessprobe with Exec having pipe
            Asked 2021-May-09 at 23:05

            I am adding liveness probe and readiness probe using Exec probe.
            My config looks like this:

            ...

            ANSWER

            Answered 2021-May-09 at 23:04

            You need to actually use a shell, since that's a shell feature. sh -c "foo | bar" or whatever. Also remember that all the relevant commands need to be available in the target image.

            Source https://stackoverflow.com/questions/67462890

            QUESTION

            Python client GRPC insecure connection problem with AWS
            Asked 2021-Apr-22 at 11:44

            I am facing a problem with GRPC and a python client.

            Here is what I have:

            ...

            ANSWER

            Answered 2021-Apr-21 at 17:47

            You may want to post other parts of the trace log. To debug this issue, we need to:

            • Check if the name resolution worked, there should be a log saying the given address has been resolved into ip:port;
            • See why each address won't work, like the ip:port is not reachable.

            If the problem still can't be solved, I would recommend to post issues to https://github.com/grpc/grpc/issues.

            Source https://stackoverflow.com/questions/67177689

            QUESTION

            Kubernetes GRPC internal communication between services Connection refused
            Asked 2021-Apr-02 at 16:04

            I'm trying to communicate via grpc between two microservices internally on kubernetes, but I'm getting a connection refused error.

            These are the yaml files of the services that are trying to communicate.

            ...

            ANSWER

            Answered 2021-Apr-02 at 16:04

            QUARKUS_GRPC_SERVER_HOST should be 0.0.0.0 instead of localhost

            Source https://stackoverflow.com/questions/66910568

            QUESTION

            How to detect a cancelled/lost/closed connection in Cloud Run with gRPC server streaming?
            Asked 2021-Mar-29 at 22:15

            I have a server-side streaming RPC hosted on Google Cloud Run.

            With the following proto definition:

            ...

            ANSWER

            Answered 2021-Mar-29 at 22:15

            QUESTION

            How to grpcurl list for gRPC service with reflection on CloudRun?
            Asked 2021-Mar-07 at 21:49

            Following this example:

            gRPC in Google Cloud Run

            https://github.com/grpc-ecosystem/grpc-cloud-run-example/blob/master/golang/README.md

            I've deployed a gRPC service with reflection on CloudRun.

            Using grpcurl for testing: https://github.com/fullstorydev/grpcurl

            ...

            ANSWER

            Answered 2021-Mar-07 at 21:49

            gRPC Reflection requires bidirectional streaming, so make sure to check the Enable HTTP/2 option (--use-http2) while deploying. That will enable bi-di streaming.

            Also make sure to use the :443 port and authenticate to the server if needed by adding Authentication metadata (see Service-to-Service authentication documentation).

            Source https://stackoverflow.com/questions/66510394

            QUESTION

            How to upload an image in chunks with client-side streaming gRPC using grpcurl
            Asked 2021-Feb-03 at 22:05

            I have been trying to upload an image in chunks with client side streaming using grpcurl. The service is working without error except that at the server, image data received is 0 bytes.
            The command I am using is:

            grpcurl -proto image_service.proto -v -d @ -plaintext localhost:3010 imageservice.ImageService.UploadImage < out

            This link mentions that the chunk data should be base64 encode and so the contents of my out file are:

            ...

            ANSWER

            Answered 2021-Feb-03 at 22:05

            Interesting question. I've not tried streaming messages with (the excellent) grpcurl.

            The documentation does not explain how to do this but this issue shows how to stream using stdin.

            I recommend you try it that way first to ensure that works for you.

            If it does, then bundling various messages into a file (out) should also work.

            Your follow-on questions suggest you're doing this incorrectly.

            • chunk_data is the result of having split the file into chunks; i.e. each of these base64-encoded strings should be a subset of your overall image file (i.e. a chunk).

            • your first message should be { "info": "...." }, subsequent messages will be { "chunk_data": "" } until EOF.

            Source https://stackoverflow.com/questions/66034060

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install grpcurl

            Download the binary from the releases page.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/fullstorydev/grpcurl.git

          • CLI

            gh repo clone fullstorydev/grpcurl

          • sshUrl

            git@github.com:fullstorydev/grpcurl.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Go Libraries

            go

            by golang

            kubernetes

            by kubernetes

            awesome-go

            by avelino

            moby

            by moby

            hugo

            by gohugoio

            Try Top Libraries by fullstorydev

            grpcui

            by fullstorydevGo

            grpchan

            by fullstorydevGo

            emulators

            by fullstorydevGo

            fullstory-browser-sdk

            by fullstorydevJavaScript

            hauser

            by fullstorydevGo