TLS Config support for Mongo QuadStore


#1

Hello,

I’m building out a service which uses Cayley in Golang with a remote Mongo Cluster which requires a TLS Config on connection. Is there a way to pass that config into the QuadStore init that I’m missing? If not, is there any chance of adding this in the near future?

        info, _ := mgo.ParseURL(addr)
		tlsConfig := &tls.Config{}

		info.DialServer = func(addr *mgo.ServerAddr) (net.Conn, error) {
			conn, err := tls.Dial("tcp", addr.String(), tlsConfig)
			return conn, err
		}
		return mgo.DialWithInfo(info)

Thanks,
David


#2

Hi @dkleyla, and sorry for a long wait.

Yes, we support this use case, but it’s not well-documented. You can pass a “session” option to Init/New with established Mongo session and database will use it for all requests.