我试图搜索 mongo-go-driver 的 clientOptions 的默认值。
我正在尝试通过以下方式启动新客户:
opts := options.ClientOptions{}
opts.ApplyURI(connectionURI)
sharedConnection, err = mongo.NewClient(&opts)
我想知道 ConnectTimeout、MaxPoolSize、MaxConnIdleTime 等少数 clientOptions 的默认值是什么。
type ClientOptions struct {
ConnectTimeout *time.Duration
Compressors []string
Dialer ContextDialer
HeartbeatInterval *time.Duration
LocalThreshold *time.Duration
MaxConnIdleTime *time.Duration
MaxPoolSize *uint16
Monitor *event.CommandMonitor
ReadConcern *readconcern.ReadConcern
ReadPreference *readpref.ReadPref
Registry *bsoncodec.Registry
RetryWrites *bool
ServerSelectionTimeout *time.Duration
Direct *bool
SocketTimeout *time.Duration
TLSConfig *tls.Config
WriteConcern *writeconcern.WriteConcern
ZlibLevel *int
}
慕标5832272
慕姐4208626
相关分类