Skip to content

Commit 334e3f5

Browse files
authored
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.
1 parent f415774 commit 334e3f5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd/grpcurl/grpcurl.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ var (
133133
is received for this same period then the connection is closed and the
134134
operation fails.`))
135135
maxTime = flags.Float64("max-time", 0, prettify(`
136-
The maximum total time the operation can take, in seconds. This is
137-
useful for preventing batch jobs that use grpcurl from hanging due to
138-
slow or bad network links or due to incorrect stream method usage.`))
136+
The maximum total time the operation can take, in seconds. This sets a
137+
timeout on the gRPC context, allowing both client and server to give up
138+
after the deadline has past. This is useful for preventing batch jobs
139+
that use grpcurl from hanging due to slow or bad network links or due
140+
to incorrect stream method usage.`))
139141
maxMsgSz = flags.Int("max-msg-sz", 0, prettify(`
140142
The maximum encoded size of a response message, in bytes, that grpcurl
141143
will accept. If not specified, defaults to 4,194,304 (4 megabytes).`))

0 commit comments

Comments
 (0)