traun
July 31, 2017, 6:24pm
1
In the gocb.Connect() API call:
func Connect(connSpecStr string) (*Cluster, error)
Connect creates a new Cluster object for a specific cluster.
Is there any docs on what the connSpecStr should look like when trying to pass multiple couchbase server URLs?
jkurtz
August 1, 2017, 1:14am
2
Hi @traun ,
You can also specify multiple hosts in the connection string by separating each host with a comma:
cluster, err := gocb.Connect("couchbase://host1,host2,host3,hostN")
Specifying multiple hosts may add additional redundancy when bootstrapping.
From Managing Connections .
traun
August 1, 2017, 5:57pm
3
Thanks @jkurtz !
Is it possible to use the couchbase:// format on non-standard ports? For example, if map port 28091 is mapped to port 8091, is it possible to connect via this syntax?
traun
August 1, 2017, 9:58pm
4
From looking at https://github.com/couchbaselabs/gocbconnstr , looks like non-standard ports are supported