Commit Graph

53 Commits

Author SHA1 Message Date
goodfirm
0e13e85e65 chore: fix some typos in comments (#454)
Signed-off-by: goodfirm <fanyishang@yeah.net>
2024-04-10 09:51:09 -04:00
Joshua Humphries
07361b21ea Use latest protoreflect to fix some bugs (#453)
* update to latest jhump/protoreflect

* be lenient when possible if server cannot furnish all dependencies

* move linting back to go 1.21 instead of latest go 1.22

* make staticcheck happy
2024-04-09 17:50:10 -04:00
Kristopher Wuollett
149a93e0ec Use localhost for default unix domain socket authority (#445) 2024-01-30 11:38:15 -05:00
KaibutsuX
24b80dfed8 Added initial support for -t flag to show timings (#428)
* Added initial support for -t flag to show timings

Shows very basic timing data for the Dial stage (TLS setup and
BlockingDial) and InvokeRPC method as well as the total time.

* Made timing data part of the very verbose functionality

* cleanup

* fix

---------

Co-authored-by: Scott Blum <dragonsinth@gmail.com>
2024-01-23 19:04:51 -05:00
Michael Diamond
334e3f56de Expand the documentation of -max-time to clarify this sets the RPC timeout (#435)
Notably, this adds the words "timeout" and "deadline" to this help text which is helpful for discovering this flag.
2024-01-09 11:39:10 -05:00
Scott Blum
7ccaf0a21f indent: rip out old go 1.9 support 2023-11-22 08:54:31 -05:00
Jonathan Beaulieu
c17f0782f7 Added alts credential option (#341)
* Added alts credential option

Added flag that sets up ALTS credentials to connect to gRPC services using Application Layer Transport Security.

Reference: https://grpc.io/docs/languages/go/alts/
Fixes: #333

* Added ALTS client options as cmd arguments.

* Update target service accounts docs

Co-authored-by: Joshua Humphries <2035234+jhump@users.noreply.github.com>

* Applied feedback

* Small fix: removed indirection on usetls

---------

Co-authored-by: Joshua Humphries <2035234+jhump@users.noreply.github.com>
2023-09-25 13:57:49 -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
dependabot[bot]
dd2f60135c Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0 (#343)
* Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0

Bumps [github.com/jhump/protoreflect](https://github.com/jhump/protoreflect) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/jhump/protoreflect/releases)
- [Commits](https://github.com/jhump/protoreflect/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/jhump/protoreflect
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix ci

* what can we even build on?

* stop testing old things

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Scott Blum <dragonsinth@gmail.com>
2022-11-01 10:26:55 -04:00
cui fliter
fec466efa6 fix some typos (#314)
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-07-20 14:57:53 -04:00
Lyubomir Gardev
353e0953cb Enable support for Unix sockets for Windows by enabling -unix flag for Windows builds. (#317) 2022-06-20 09:37:33 -04:00
Jeff Widman
b34b13bab3 Bump grpc lib and fix deprecations (#286)
* Bump google.golang.org/grpc from 1.37.0 to 1.44.0

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.37.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.37.0...v1.44.0)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-05 10:28:05 -05:00
Jeffrey Duce
9ac7e3a34d set value of creds instead of creating new variable (#263) 2021-10-07 15:49:59 -04:00
Igor
127194b205 Support SSLKEYLOGFILE environment variable for key logging (#245) 2021-09-20 11:53:44 -04:00
Joshua Humphries
8d7770a962 use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
Leonhard Markert
1f34448998 Help text for "-H" option: remove duplicated word (#207) 2021-02-01 10:31:49 -05:00
Mikhail Katychev
9da71fbe53 when -format-error option is used, format service reflection errors, too (#188) 2020-09-30 13:24:46 -04:00
Guilherme Salazar
9846afccbc feat: add support for user-agent header (#182) 2020-09-04 11:31:28 -04:00
Sergei Vorobev
e544b9e66f Print size of the message in very verbose mode (#181)
Adds -vv flag for "very verbose".
Includes estimated message size when enabled. The size is an estimate because it is the canonical size for the proto message, but not necessarily its actual on-the-wire size.
2020-08-14 11:02:42 -04:00
Adam Babik
8e51c5e2d3 cmd/grpcurl: add -allow-unknown-fields option (#147) 2020-07-23 10:54:06 -04:00
Joshua Humphries
0162fa9726 go.mod and Makefile tweaks; move import of xds package to cmd/grpcurl (#170) 2020-07-14 12:20:32 -04:00
Mikhail Katychev
36008aa111 Add -format-error option (#155) 2020-05-14 20:40:13 -04:00
Alexander Chiu
36f9e53dfd Allow extra descriptor sources in reflection mode (#146)
Allows descriptors or proto files to be supplied that are used as an additional descriptor source when server reflection is used. This is needed to resolve message types embedded in an Any message, that the server has no knowledge of, as well as extensions that the server has no knowledge of.
2020-04-20 15:42:11 -04:00
Joshua Humphries
0d669e78d0 use wrapped TransportCredentials instead of handling handshake in Dialer (#130)
* use wrapped TransportCredentials instead of handling handshake in Dialer, so that grpc library will use correct :scheme
* support -authority for TLS conns; now effectively supercedes -servername flag
2020-01-27 12:15:47 -05:00
Blake Williams
9572bd4525 Register gzip decoder (#124) 2019-11-26 08:55:50 -05:00
Joshua Humphries
ccc9007156 add -protoset-out option (#120) 2019-09-30 09:50:17 -04:00
J M
9248ea0963 Add Expand Headers Feature (#117) 2019-09-26 17:26:38 -04:00
Joshua Humphries
5631bba117 add official Dockerfile (#104) 2019-07-03 15:57:24 -04:00
Joshua Humphries
5d6316f470 Adds support for showing error details (#98)
To better support printing of google.protobuf.Any messages (error details), this
also makes a few other changes:
1. Allows printing of unresolvable Any messages using an "@value" field in JSON output
   that has the base64-encoded embedded message data.
2. Improves support for "-format text" to show expanded Any messages if possible.
   (Due to limitations in underlying proto package, this will usually *not* be
   that helpful. But this should greatly improve with v2 of the go protobuf API.)
3. Addresses a TODO in existing AnyResolver code to lazily fetch descriptors
   as needed instead of having to download all files eagerly.
2019-04-09 09:34:39 -04:00
Joshua Humphries
4c9c82cec3 use custom flagset (#85) 2019-02-28 10:58:53 -05:00
Joshua Humphries
5082a1dc68 add -max-msg-sz flag (#84) 2019-02-28 08:35:50 -05:00
Joshua Humphries
1e8e50f4f8 make MakeTemplate more robust (#60) 2018-10-22 22:59:11 -04:00
Joshua Humphries
7cabe7a9d0 move more stuff from cmd to package (#59) 2018-10-19 14:47:25 -04:00
Joshua Humphries
9a4bbacdd6 some pre-factoring and small fixes (#58)
* organize into multiple files
* make listing methods show fully-qualified names
* address small feedback from recent change (trim then check if empty)
2018-10-18 23:51:38 -04:00
Joshua Humphries
58cd93280e use proto syntax for describe (#57) 2018-10-18 13:50:44 -04:00
Joshua Humphries
a337c1afcf improve flag doc with go 1.10+ (#56) 2018-10-18 13:16:33 -04:00
Joshua Humphries
e00ef3eb7c add option to support text format (#54)
* augments grpcurl package API in order to handle multiple formats
* deprecates old signature for InvokeRpc
* add command-line flag to use protobuf text format instead of JSON
* use AnyResolver when marshaling to/from JSON
2018-10-16 21:26:16 -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
Joshua Humphries
6198551381 add bankdemo, from Gophercon 2018 demo (#45) 2018-09-07 18:21:02 -04:00
Jean de Klerk
b709105be9 allow period at the start of a symbol (#40) 2018-07-06 22:41:22 +02:00
KUOKA Yusuke
75dcbf0d4c Allow passing :authority pseudo header (#33) 2018-05-24 12:18:45 -04:00
Joshua Humphries
ec219b3c15 allow the use of proto source files directly, instead of having to compile to protoset files (#32) 2018-05-23 14:13:24 -04:00
Josh Humphries
e6ac789274 grpclog.Printf deprecated; use Info instead 2018-05-08 10:08:35 -04:00
Joshua Humphries
ca5693f42c support unix sockets (#26) 2018-03-27 11:24:35 -04:00
Joshua Humphries
224c3acd1d enable more linters in CI; fix some issues caught by them (#23) 2018-03-24 10:33:21 -04:00
Johannes Kohnen
f203c2cddf Flag to override server name when validating TLS cert (#20) 2018-03-22 20:47:51 -04:00
Joshua Humphries
585cd1bae8 print summary message only when verbose flag is set (#19) 2018-03-13 16:49:09 -04:00
Joshua Humphries
f7eb17819d add more control over request metadata; add message templates (#17)
* add more control over request metadata between reflection calls and main RPC invocation
* add flag to print a message template (when describing message types)
* relax some command-line argument issues to warnings
2018-03-08 11:29:06 -05:00
Frederik
99a3346b94 Allow reflection calls to carry headers (#15) 2018-03-02 12:01:37 -05:00
Peter Edge
ceba64b971 Delete references to json.RawMessage (#12) 2018-02-20 15:03:05 -05:00