[GODRIVER-450] Combine options that are singular entities Created: 05/Jun/18  Updated: 28/Oct/23  Resolved: 29/Jun/18

Status: Closed
Project: Go Driver
Component/s: Options & Configuration
Affects Version/s: 0.0.6
Fix Version/s: 0.0.9

Type: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Roland Fong
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Options Management

 Description   

There are currently a number of options that are set in the same way they are set on the connection string. These options are for write concern, read concern, read preference, authentication, and SSL. There is no need to override these types in a non-wholesale manner, e.g. taking the tags from the connection string and the mode from a client options and combining them, and doing so could cause bugs, e.g. taking the tags from a connection string and combining it with a read preference mode of primary.

Update the client options for read concern, write concern, read preference, authentication, and SSL to take entire types instead of having a method for each one. The options for read concern, write concern, and read preference should take a *readconcern.ReadConcern, *writeconcern.WriteConcern, and *readpref.ReadPref, respectively. For authentication, a new type is required that combines the individual authentication credential options. For SSL, a new type is required that combines the individual SSL options.



 Comments   
Comment by Githook User [ 29/Jun/18 ]

Author:

{'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}

Message: Merge branch 'pr/74'

GODRIVER-157
GODRIVER-272
GODRIVER-335
GODRIVER-356
GODRIVER-350
GODRIVER-450

Change-Id: I713dc0fba4bbdee2445349262ea653d101e1299c
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/5fea1444e52844a15513c0d9490327b2bd89ed7c

Comment by Githook User [ 29/Jun/18 ]

Author:

{'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}

Message: Add Username and Password to Clientopt Credential

GODRIVER-450

Change-Id: Iba41436518e2d56633bc17bf310f97a5960a79e0
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/1a4b9ed3832dad9a540d0751d3a28dd1eb85b6f0

Comment by Githook User [ 29/Jun/18 ]

Author:

{'username': 'rfblue2', 'name': 'Roland Fong', 'email': 'rfblue2@gmail.com'}

Message: Add mongo/clientopt

GODRIVER-272
GODRIVER-450

Change-Id: I90ca993fc7605b71a4b32283694af68a68a9279d
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/c6a8120f32dc9d78b0c35099fd70624bb3b0f537

Comment by Roland Fong [ 25/Jun/18 ]

https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/416020

Comment by Kristofer Brandow (Inactive) [ 25/Jun/18 ]

As part of this we should also switch the clientopt package to use last option wins instead of first option wins.

Generated at Thu Feb 08 08:34:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.