blob: 68d3850b525c843feac647100249cec4818da3cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// +build ssl
package db
import (
"github.com/mongodb/mongo-tools/common/db/openssl"
"github.com/mongodb/mongo-tools/common/options"
)
func init() {
GetConnectorFuncs = append(GetConnectorFuncs, getSSLConnector)
}
// return the SSL DB connector if using SSL, otherwise, return nil.
func getSSLConnector(opts options.ToolOptions) DBConnector {
if opts.SSL.UseSSL {
return &openssl.SSLDBConnector{}
}
return nil
}
|