Skip to content

Commit

Permalink
Expand the documentation of -max-time to clarify this sets the RPC ti…
Browse files Browse the repository at this point in the history
…meout (#435)

Notably, this adds the words "timeout" and "deadline" to this help text which is helpful for discovering this flag.
  • Loading branch information
dimo414 authored Jan 9, 2024
1 parent f415774 commit 334e3f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/grpcurl/grpcurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ var (
is received for this same period then the connection is closed and the
operation fails.`))
maxTime = flags.Float64("max-time", 0, prettify(`
The maximum total time the operation can take, in seconds. This is
useful for preventing batch jobs that use grpcurl from hanging due to
slow or bad network links or due to incorrect stream method usage.`))
The maximum total time the operation can take, in seconds. This sets a
timeout on the gRPC context, allowing both client and server to give up
after the deadline has past. This is useful for preventing batch jobs
that use grpcurl from hanging due to slow or bad network links or due
to incorrect stream method usage.`))
maxMsgSz = flags.Int("max-msg-sz", 0, prettify(`
The maximum encoded size of a response message, in bytes, that grpcurl
will accept. If not specified, defaults to 4,194,304 (4 megabytes).`))
Expand Down

0 comments on commit 334e3f5

Please sign in to comment.