clusterOp

package
v0.0.0-...-31abfad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 CreateCollection(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)

func CreateScope

func CreateScope(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)

func DropBucket

func DropBucket(authHandler pc.AuthFunction, nodeAddress, bucketName string) error

func DropCollection

func DropCollection(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)

func DropScope

func DropScope(authHandler pc.AuthFunction, nodeAddress string, keyspace Keyspace) (string, error)

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 GetTask

func GetTask(authHandler pc.AuthFunction, nodeAddress string, taskType string) (map[string]interface{}, error)

func Rebalance

func Rebalance(authHandler pc.AuthFunction, nodeAddress string, wait bool) 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 FailoverOption struct {
	NodeToRemove Node
	HardFailover bool
	Unsafe       bool
}

type Keyspace

type Keyspace struct {
	BucketName     string
	ScopeName      string
	CollectionName string
}

type Node

type Node struct {
	HostName string   `json:"hostname"`
	Services []string `json:"services"`
}

type RecoveryOption

type RecoveryOption struct {
	NodeToRecovery Node
	DeltaRecovery  bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL