Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dial docs with already supported query params #379

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ const (
// false: Initiate the connection without TLS/SSL.
// The default value is false.
//
// w=<wmode>
//
// Write mode for MongoDB 2.0+ (e.g. "majority").
//
// j=<true|false>
//
// Sync via the journal if present
//
// readPreference=<nearest|primary|primaryPreferred|secondary|secondaryPreferred>
//
// Read preference mode. See Mode for details.
//
// Relevant documentation:
//
// http://docs.mongodb.org/manual/reference/connection-string/
Expand Down Expand Up @@ -341,19 +353,19 @@ func ParseURL(url string) (*DialInfo, error) {
if err != nil {
return nil, err
}
ssl := false
direct := false
mechanism := ""
service := ""
source := ""
setName := ""
poolLimit := 0
appName := ""
readPreferenceMode := Primary
var readPreferenceTagSets []bson.D
minPoolSize := 0
maxIdleTimeMS := 0
safe := Safe{}
ssl := false // ssl
direct := false // connect
mechanism := "" // authMechanism
service := "" // gssapiServiceNname
source := "" // authSource
setName := "" // replicaSet
poolLimit := 0 // maxPoolSize
appName := "" // appName
readPreferenceMode := Primary // readPreference
var readPreferenceTagSets []bson.D // readPreferenceTags
minPoolSize := 0 // minPoolSize
maxIdleTimeMS := 0 // maxIdleTimeMS
safe := Safe{} // w/j
for _, opt := range uinfo.options {
switch opt.key {
case "ssl":
Expand Down