connection timeout

This commit is contained in:
nquidox 2026-04-02 15:36:37 +03:00
parent 46e07b7577
commit 9d837385b1
2 changed files with 30 additions and 2 deletions

View file

@ -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