mirror of
https://github.com/bensema/gotdx.git
synced 2025-11-21 02:45:33 +08:00
ip替换
This commit is contained in:
11
options.go
11
options.go
@@ -6,8 +6,9 @@ const (
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
TCPAddress string // 服务器地址
|
||||
MaxRetryTimes int // 重试次数
|
||||
TCPAddress string // 服务器地址
|
||||
TCPAddressPool []string // 服务器地址池
|
||||
MaxRetryTimes int // 重试次数
|
||||
}
|
||||
|
||||
func defaultOptions() *Options {
|
||||
@@ -32,3 +33,9 @@ func WithTCPAddress(tcpAddress string) Option {
|
||||
o.TCPAddress = tcpAddress
|
||||
}
|
||||
}
|
||||
|
||||
func WithTCPAddressPool(ips ...string) Option {
|
||||
return func(o *Options) {
|
||||
o.TCPAddressPool = ips
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user