From 18855a604aaaa50b4286bd128e755c0df7b09a74 Mon Sep 17 00:00:00 2001 From: Michael Diamond Date: Fri, 8 Dec 2023 15:09:14 -0800 Subject: [PATCH] Expand the documentation of -max-time to clarify this sets the RPC timeout Notably, this adds the words "timeout" and "deadline" to this help text which is helpful for discovering this flag. --- cmd/grpcurl/grpcurl.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/grpcurl/grpcurl.go b/cmd/grpcurl/grpcurl.go index 6ef517b..0812446 100644 --- a/cmd/grpcurl/grpcurl.go +++ b/cmd/grpcurl/grpcurl.go @@ -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).`))