new Cluster(cnstr)
Represents a singular cluster containing your buckets.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
cnstr |
string |
<optional> |
The connection string for your cluster. |
- Since:
-
- 2.0.0 (stability: committed)
Methods
-
manager() → {ClusterManager}
-
Creates a manager allowing the management of a Couchbase cluster.
- Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- ClusterManager
-
openBucket(name, password, callback) → {Bucket}
-
Open a bucket to perform operations. This will begin the handshake process immediately and operations will complete later. Subscribe to the
connect
event to be alerted when the connection is ready, though be aware operations can be successfully queued before this.Parameters:
Name Type Argument Description name
string <optional>
The name of the bucket to open.
password
string <optional>
Password for the bucket.
callback
function <optional>
Callback to invoke on connection success or failure.
- Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- Bucket