From 612aeb36e9d76be9d60528f83eafc8d167dda2c9 Mon Sep 17 00:00:00 2001 From: "Pascal S. de Kloe" Date: Tue, 14 Mar 2023 17:49:13 +0100 Subject: [PATCH] config docs --- client.go | 14 ++++++++------ pubsub.go | 10 +++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/client.go b/client.go index 4fd56e9..66d0eab 100644 --- a/client.go +++ b/client.go @@ -32,15 +32,17 @@ type ClientConfig struct { // domain sockets. Addr string - // Limit execution duration when nonzero. Expiry causes a reconnect (to - // prevent stale connections) and a net.Error with Timeout() true. + // Limit execution duration when nonzero. Expiry causes a reconnect + // to prevent stale connections and a net.Error with Timeout() true. CommandTimeout time.Duration // Limit the duration for network connection establishment. Expiry - // causes an abort plus retry. Zero defaults to one second. Any command - // submission blocks during the first attempt. When the connect fails, - // then command submission receives the error of the last attempt, until - // the connection restores. + // causes an abort plus retry. See net.Dialer Timeout for details. + // Zero defaults to one second. + // + // Command submission blocks during the first dial attempt. When the + // connect fails, then command submission receives the error of the last + // connect attempt until the connection restores. DialTimeout time.Duration // AUTH when not nil. diff --git a/pubsub.go b/pubsub.go index 701cb55..7bccc58 100644 --- a/pubsub.go +++ b/pubsub.go @@ -46,14 +46,14 @@ type ListenerConfig struct { // domain sockets. Addr string - // Limits the execution time for AUTH, QUIT, SUBSCRIBE, PSUBSCRIBE, - // UNSUBSCRIBE, PUNSUBSCRIBE and PING. The network connection is closed - // upon expiry, which causes the automated reconnect attempts. + // Limit execution duration of AUTH, QUIT, SUBSCRIBE & UNSUBSCRIBE. + // Expiry causes a reconnect to prevent stale connections. // Zero defaults to one second. CommandTimeout time.Duration - // Upper boundary for network connection establishment. See the - // net.Dialer Timeout for details. Zero defaults to one second. + // Limit the duration for network connection establishment. Expiry + // causes an abort plus retry. See net.Dialer Timeout for details. + // Zero defaults to one second. DialTimeout time.Duration // AUTH when not nil.