Commit Graph

25 Commits

Author SHA1 Message Date
PietroPasotti
3a8fa31879 Snap: strict confinement, stable grade and docs (#514) 2025-03-18 23:01:48 -04:00
ironhide0396
fb49f049e6 Update README.md (#353)
Updating README to add information about  the usage of headers/metadata in the rpc request.
2024-10-11 10:40:52 -04:00
Hector Oliveros
46c38b351a feat: Add functionality to export proto files (#475)
* Add functionality to export proto files

Added a new function, `WriteProtoFiles` in `desc_source.go` which is used to generate .proto files. The process involves resolving symbols from the descriptor source and writing their definitions to a designated output directory. The corresponding flag `--proto-out` has been included in `grpcurl.go` to allow users to specify the directory path.

* Refactor file creation error handling

The code for file creation and error handling in desc_source.go has been refactored. Previously, the file closure operation was executed irrespective of whether the file was created successfully or not. Now, the file will only be closed if it was successfully created, improving error handling.

* Update 'proto-out' command to 'proto-out-dir'

The command for exporting proto files and setting the output directory has been updated from 'proto-out' to 'proto-out-dir'. This change has been made both in the README and the grpcurl go file. This makes the command name more descriptive, accurately reflecting its functionality.

* fix import sort

* Reorder file close operation in error handling

The file close operation has been moved within the error handling of the 'PrintProtoFile' function. Previously, it was being executed before this function, now it's executed immediately after. Moreover, an additional close operation has been added after the function success ensuring the file is properly closed in all scenarios.

* Update grpcurl commands in README

The grpcurl commands for exporting proto files and protoset files in the README are updated. The IP address has been changed to localhost and port number to '8787'. Also, the service name is adjusted to 'my.custom.server.Service'. Instructions for use of specific command options are added for enhanced clarity.

* Refactor error handling in file creation

The code responsible for error handling during file creation in the desc_source.go file has been streamlined. This modification simplifies the code by reducing unnecessary condition checks and redundant file closure action after an error has occurred.

* Refactor proto file writing into separate function

The file writing process for protobuf files has been extracted into a new function called writeProtoFile(). This refactoring simplifies the main function. The code is cleaner and more manageable this way, improving maintainability and readability.

* Refactor writeProtoFile function for better error handling

Streamlined the writeProtoFile function in desc_source.go file. Simplified path calculations and improved error messages for file-creation functions, making it easier to trace the exact point of failure and enhance the debugging process.
2024-07-12 12:47:32 -04:00
Valters Jansons
2a29c1e64b Use grpc.reflection.v1.ServerReflection (#407)
The proper `v1` gRPC reflection has been around for a bit.
The "client auto" mechanism still supports falling back to `v1alpha`.
Not many support the `v1`, but we should default to it when possible.
2023-08-31 12:13:33 -04:00
Bjarne Sievers
30b8cd1531 Add info about docker pitfalls to README (#258) 2021-10-06 15:25:18 -04:00
Joshua Humphries
bf9b13d6c5 update install from source directions to work with Go 1.16 2021-09-23 10:37:13 -04:00
Joshua Humphries
c3bde04cc1 use circleci instead of travis (#256) 2021-09-23 09:20:48 -04:00
Joshua Humphries
f1d396c31e freshen README, point to 3rd party packages for install (#229) 2021-05-04 12:03:54 -04:00
Joshua Humphries
54ffdcacda fix typo 2020-08-24 13:58:09 -04:00
Joshua Humphries
ceef817807 make use of -plaintext flag more clear in examples 2020-08-24 13:56:57 -04:00
Joshua Humphries
8376c2f7bb update go get line in README
Go tool needs to also gets dependencies for sub-packages
2020-07-20 12:46:55 -04:00
Joshua Humphries
ff114930fd update travis badge and link 2020-07-09 20:53:23 -04:00
Joshua Humphries
ce84976d3c fix typo in readme
fixes #79
2019-02-27 18:16:55 -05:00
Andrew McCallum
4a329f3b13 add Homebrew installation method to README (#77) 2019-01-23 10:50:39 -05:00
Joshua Humphries
69ea782936 reconcile with recent change to "describe" output 2018-10-18 13:54:51 -04:00
Joshua Humphries
397a8c18ca update README (#55)
* Revises the sections that talk about descriptor sources, making them more consistent.
* Adds a link to the Gophercon 2018 talk on grpcurl.
* Improve  installation section, mentioning versioned Go.
2018-10-16 12:56:40 -04:00
Leigh McCulloch
79a550b858 add goreleaser (#49)
* add goreleaser

Add a goreleaser configuration file that builds binaries for Linux,
MacOS and Windows, for 32bit (x86/386) and 64bit (x64/amd64). The
binaries will be archived into a tar.gz/zip file along with the LICENSE
file.

The `dist/` directory will be written to by goreleaser with the binaries
during the build process, so it's also been added to .gitignore.

To build all the binaries and release them to GitHub:
1. Tag the release. e.g. `git tag -a v1.0.0 -m 'First release'`
2. Generate a GitHub Personal Access Token. See https://github.com/settings/tokens.
3. Push the release to GitHub. e.g. `git push origin v1.0.0`
4. Make the release, which will publish binaries to the GitHub "Releases" page. e.g.  `GITHUB_TOKEN=xxxxxxx... make release`

* add -version flag

Run `grpcurl -version` to see the release version. Use `make install` to build a binary that shows the version based on current git hash (which will show a version number if HEAD is a release tag and otherwise uses `git describe` to summarize the version).
2018-09-25 09:34:02 -04:00
Jean de Klerk
1e72fa2cd1 Point to server reflection docs (#38)
Service reflection has very poor SEO and unfortunately not great discoverability. Since this package is an entry-point for service reflection, this helps make the process of finding this information easier.
2018-08-08 10:43:18 -04:00
Joshua Humphries
9d19f10af7 fix doc section regarding protoset and proto sources
There was a paragraph that mentioned protoset files but failed to mention support for proto source files. Now fixed.
2018-07-16 14:44:31 -04:00
Joshua Humphries
2ff725abb2 add -d examples to README
resolves #37
2018-07-06 09:13:34 +02:00
Joshua Humphries
819d39047c add go report card badge to README 2018-06-08 17:22:08 -04:00
Joshua Humphries
7e882c8a7c update README.md (#36)
- Adds a travis CI badge at the top.
- Adds an "installation" section that should address #30
- Adds content about using proto source files.
2018-05-31 12:48:30 -04:00
Joshua Humphries
46121b1305 fix bad port number in README examples (#7) 2018-02-19 14:01:04 -05:00
Joshua Humphries
a8483857e4 be consistent about capitalization of gRPC 2017-11-20 13:18:09 -05:00
Josh Humphries
9dfaded6cf initial commit, functioning grpcurl command-line util 2017-11-20 13:15:15 -05:00