Skip to content

Commit

Permalink
config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaldekloe committed Mar 14, 2023
1 parent 75cf437 commit 612aeb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 8 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 612aeb3

Please sign in to comment.