Add support for SSL
This commit is contained in:
parent
47d20761c5
commit
3c124cea01
2 changed files with 7 additions and 1 deletions
|
|
@ -137,7 +137,7 @@
|
||||||
[{:keys [connections-per-host threads-allowed-to-block-for-connection-multiplier
|
[{:keys [connections-per-host threads-allowed-to-block-for-connection-multiplier
|
||||||
max-wait-time connect-timeout socket-timeout socket-keep-alive auto-connect-retry max-auto-connect-retry-time
|
max-wait-time connect-timeout socket-timeout socket-keep-alive auto-connect-retry max-auto-connect-retry-time
|
||||||
description write-concern cursor-finalizer-enabled read-preference
|
description write-concern cursor-finalizer-enabled read-preference
|
||||||
required-replica-set-name]}]
|
required-replica-set-name ssl-invalid-hostname-allowed ssl-enabled]}]
|
||||||
(let [mob (MongoClientOptions$Builder.)]
|
(let [mob (MongoClientOptions$Builder.)]
|
||||||
(when connections-per-host
|
(when connections-per-host
|
||||||
(.connectionsPerHost mob connections-per-host))
|
(.connectionsPerHost mob connections-per-host))
|
||||||
|
|
@ -155,6 +155,10 @@
|
||||||
(.readPreference mob read-preference))
|
(.readPreference mob read-preference))
|
||||||
(when description
|
(when description
|
||||||
(.description mob description))
|
(.description mob description))
|
||||||
|
(when ssl-enabled
|
||||||
|
(.sslEnabled mob ssl-enabled))
|
||||||
|
(when ssl-invalid-hostname-allowed
|
||||||
|
(.sslInvalidHostNameAllowed mob ssl-invalid-hostname-allowed))
|
||||||
(when write-concern
|
(when write-concern
|
||||||
(.writeConcern mob write-concern))
|
(.writeConcern mob write-concern))
|
||||||
(when cursor-finalizer-enabled
|
(when cursor-finalizer-enabled
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@
|
||||||
:auto-connect-retry true
|
:auto-connect-retry true
|
||||||
:max-auto-connect-retry-time 1
|
:max-auto-connect-retry-time 1
|
||||||
:description "Description"
|
:description "Description"
|
||||||
|
:ssl-enabled true
|
||||||
|
:ssl-invalid-hostname-allowed true
|
||||||
:write-concern com.mongodb.WriteConcern/JOURNAL_SAFE
|
:write-concern com.mongodb.WriteConcern/JOURNAL_SAFE
|
||||||
:cursor-finalizer-enabled true
|
:cursor-finalizer-enabled true
|
||||||
:required-replica-set-name "rs"}]
|
:required-replica-set-name "rs"}]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue