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
connectevent to be alerted when the connection is ready, though be aware operations can be successfully queued before this.Parameters:
Name Type Argument Description namestring <optional>
The name of the bucket to open.
passwordstring <optional>
Password for the bucket.
callbackfunction <optional>
Callback to invoke on connection success or failure.
- Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- Bucket