mongo.get.primary: Get the host & port of the server to which a mongo object is...

Description Usage Arguments Value See Also Examples

View source: R/mongo.R

Description

Get the host & port of the server to which a mongo object is connected.

Usage

1

Arguments

mongo

(mongo) a mongo connection object.

Value

String host & port in the format "%s:%d".

See Also

mongo.create,
mongo.

Examples

1
2
3
4
5
6
7
## Not run: 
mongo <- mongo.create(c("127.0.0.1", "192.168.0.3"))
if (mongo.is.connected(mongo)) {
    print(mongo.get.primary(mongo))
}

## End(Not run)

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.