Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Add functions GetDDocWithRetry and GetDDocsWithRetry

This is a workaround for issue MB-13567.
latest commit 0632c5345d
Manik Taneja maniktaneja authored
Failed to load latest commit information.
cbdatasource cbdatasource: DCP rollback seqNum is in body, not the extras
examples Revert "Avoid writing to output feed if it has been closed"
populate import package reference back to couchbaselabs.
tools import package reference back to couchbaselabs.
util import package reference back to couchbaselabs.
.gitignore gitignore vim swap files.
.travis.yml Stupid travis and its old versionness.
LICENSE Added a license
README.markdown fix README
client.go Avoid sending the same err message twice on the err channel
client_test.go Handle WriteOptions masks when stringing
conn_pool.go implemented more flexible auth support
conn_pool_test.go Update import paths for memcached client
ddocs.go Add functions GetDDocWithRetry and GetDDocsWithRetry
pools.go Add functions GetDDocWithRetry and GetDDocsWithRetry
pools_test.go Some testing on connection pool replacement/fetching
tap.go Refresh bucket on connection error
upr.go MB-13331: Go-couchbase UPR panic in some shutting down sequence
util.go doc/golint cleanup
util_test.go Use table for util tests
vbmap.go doc/golint cleanup
vbmap_test.go Atomically perform bucket refreshes
views.go Running go fmt
views_test.go doc/golint cleanup

README.markdown

A smart client for couchbase in go

This is an evolving package, but does provide a useful interface to a couchbase server including all of the pool/bucket discovery features, compatible key distribution with other clients, and vbucket motion awareness so application can continue to operate during rebalances.

It also supports view querying with source node randomization so you don't bang on all one node to do all the work.

Install

go get github.com/couchbaselabs/go-couchbase

Example

c, err := couchbase.Connect("http://dev-couchbase.example.com:8091/")
if err != nil {
    log.Fatalf("Error connecting:  %v", err)
}

pool, err := c.GetPool("default")
if err != nil {
    log.Fatalf("Error getting pool:  %v", err)
}

bucket, err := pool.GetBucket("default")
if err != nil {
    log.Fatalf("Error getting bucket:  %v", err)
}

bucket.Set("someKey", 0, []string{"an", "example", "list"})
Something went wrong with that request. Please try again.