connection timeout
This commit is contained in:
parent
46e07b7577
commit
9d837385b1
2 changed files with 30 additions and 2 deletions
|
|
@ -4,6 +4,12 @@ import "time"
|
|||
|
||||
type Option func(*options)
|
||||
|
||||
func WithConnectTimeout(t time.Duration) Option {
|
||||
return func(op *options) {
|
||||
op.connectTimeout = t
|
||||
}
|
||||
}
|
||||
|
||||
func WithReconnectDelay(t time.Duration) Option {
|
||||
return func(op *options) {
|
||||
op.reconnectDelay = t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue