Documentation ¶
Index ¶
- func AddNode(authHandler pc.AuthFunction, restAddress string, node Node) error
- func CreateBucket(authHandler pc.AuthFunction, nodeAddress string, bConfig BucketConfig) error
- func CreateCollection(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)
- func CreateScope(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)
- func DropBucket(authHandler pc.AuthFunction, nodeAddress, bucketName string) error
- func DropCollection(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)
- func DropScope(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)
- func Failover(authHandler pc.AuthFunction, nodeAddress string, failoverOption FailoverOption, ...) error
- func FlushBucket(authHandler pc.AuthFunction, nodeAddress, bucketName string) error
- func GetPoolDetails(authHandler pc.AuthFunction, nodeAddress string) (map[string]interface{}, error)
- func GetTask(authHandler pc.AuthFunction, nodeAddress string, taskType string) (map[string]interface{}, error)
- func Rebalance(authHandler pc.AuthFunction, nodeAddress string, wait bool) error
- func SetRecoveryType(authHandler pc.AuthFunction, nodeAddress string, recoveryOption RecoveryOption) error
- func WaitForRebalanceComplete(authHandler pc.AuthFunction, nodeAddress string) error
- type BucketConfig
- type FailoverOption
- type Keyspace
- type Node
- type RecoveryOption
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNode ¶
func AddNode(authHandler pc.AuthFunction, restAddress string, node Node) error
Example ¶
package main import ( "net/http" ) func authHandler(req *http.Request) { req.SetBasicAuth("Administrator", "password") } func main() { node := Node{ HostName: "https://localhost:19001", Services: []string{"kv", "eventing"}, } AddNode(authHandler, "https://localhost:9000", node) }
Output:
func CreateBucket ¶
func CreateBucket(authHandler pc.AuthFunction, nodeAddress string, bConfig BucketConfig) error
func CreateCollection ¶
func CreateScope ¶
func DropBucket ¶
func DropBucket(authHandler pc.AuthFunction, nodeAddress, bucketName string) error
func DropCollection ¶
func Failover ¶
func Failover(authHandler pc.AuthFunction, nodeAddress string, failoverOption FailoverOption, wait bool) error
func FlushBucket ¶
func FlushBucket(authHandler pc.AuthFunction, nodeAddress, bucketName string) error
func GetPoolDetails ¶
func GetPoolDetails(authHandler pc.AuthFunction, nodeAddress string) (map[string]interface{}, error)
func SetRecoveryType ¶
func SetRecoveryType(authHandler pc.AuthFunction, nodeAddress string, recoveryOption RecoveryOption) error
func WaitForRebalanceComplete ¶
func WaitForRebalanceComplete(authHandler pc.AuthFunction, nodeAddress string) error
Types ¶
type BucketConfig ¶
type BucketConfig struct { Name string BucketType string // membase, memcached, couchbase, ephemeral RamQuota uint64 StorageBackend string // couchstore, magma EvictionMethod string // valueOnly, fullEviction, noEviction FlushEnabled bool }
func (BucketConfig) ToRestPayload ¶
func (b BucketConfig) ToRestPayload() []byte
type FailoverOption ¶
type RecoveryOption ¶
Click to show internal directories.
Click to hide internal directories.