ReconnectWait is an Option to set the wait time between reconnect attempts. Defaults to 2s.
(t time.Duration)
| 1141 | // ReconnectWait is an Option to set the wait time between reconnect attempts. |
| 1142 | // Defaults to 2s. |
| 1143 | func ReconnectWait(t time.Duration) Option { |
| 1144 | return func(o *Options) error { |
| 1145 | o.ReconnectWait = t |
| 1146 | return nil |
| 1147 | } |
| 1148 | } |
| 1149 | |
| 1150 | // MaxReconnects is an Option to set the maximum number of reconnect attempts. |
| 1151 | // If negative, it will never stop trying to reconnect. |
no outgoing calls