Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketConfigOption ¶
type BucketConfigOption func(*bucketConfig)
BucketConfigOption functions can be passed to Bucket() to configure its creation.
func MemoryQuota ¶
func MemoryQuota(mb int) BucketConfigOption
MemoryQuota for a bucket in megabytes.
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster provides access to cluster-level configuration and operations.
type ClusterConfigOption ¶
type ClusterConfigOption func(*clusterConfig)
ClusterConfigOption functions can be passed to Node.Configure() to configure its creation.
func Bucket ¶
func Bucket(name string, opts ...BucketConfigOption) ClusterConfigOption
Bucket configures a bucket creation with the specified name, and other optional parameters.
func BucketTimeout ¶
func BucketTimeout(secs int) ClusterConfigOption
BucketTimeout configures a time in seconds to wait for a bucket to be created.
func GeoSearchIndex ¶
func GeoSearchIndex(name, bucket string) ClusterConfigOption
GeoSearchIndex configures a geospatial index creation with the specified name for the specified bucket.
func IndexTimeout ¶
func IndexTimeout(secs int) ClusterConfigOption
IndexTimeout configures a time in seconds to wait for an index to be created.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node provides access to node-level configuration and operations.
func (*Node) Configure ¶
func (n *Node) Configure(t *testing.T, opts ...ClusterConfigOption)
Configure buckets and indexes.
func (*Node) Setup ¶
func (n *Node) Setup(t *testing.T, opts ...NodeConfigOption) *Node
Setup creates a new Couchbase node with optional specified configuration. Configuration includes the Docker image to use, node memory quotas, and node credentials.
type NodeConfigOption ¶
type NodeConfigOption func(*nodeConfig)
NodeConfigOption functions can be passed to Node.Setup() to configure its creation.
func AlwaysPull ¶
func AlwaysPull(pull bool) NodeConfigOption
AlwaysPull is set to true by default. When true, Node.Setup() will attempt to pull the latest image specified by DockerImage(). When false, Node.Setup() will use the locally available image specified by DockerImage(). Setting this to true allows the library to be used without a network connection.
func Credentials ¶
func Credentials(username, password string) NodeConfigOption
Credentials configures the username and password for the node. These can be retrieved again with Node.Username() and Node.Password().
func DockerImage ¶
func DockerImage(image string) NodeConfigOption
DockerImage configures the Couchbase image.
func MemoryQuotas ¶
func MemoryQuotas(dataMb, indexMb, searchMb uint) NodeConfigOption
MemoryQuotas configures the data, index and search memory quotas in megabytes.
func Timeout ¶
func Timeout(secs int) NodeConfigOption
Timeout configures a time in seconds to wait for a node to be available.