Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

MongoReplicaSet

Paco Zamora Martinez edited this page · 4 revisions

Methods

mongo.ReplicaSet.New(auto_reconnect, rw_timeout) - Returns a new Connection object, or nil and an error.

db,err = mongo.ReplicaSet.New(name, {hostAndPort1, ...})
  • name: (string) - the name of the mongodb replica set to which you want to connect
  • hostAndPort: (table) - a table of strings containing the host and port of the servers in your replica set

connect() - Connect to a mongo replica set.

ok, err = db:connect() 

The remaining methods are identical to those found in MongoConnection.

Something went wrong with that request. Please try again.