Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 examples import package reference back to couchbaselabs. March 25, 2014
Octocat-spinner-32 populate import package reference back to couchbaselabs. March 25, 2014
Octocat-spinner-32 tools import package reference back to couchbaselabs. March 25, 2014
Octocat-spinner-32 util import package reference back to couchbaselabs. March 25, 2014
Octocat-spinner-32 .gitignore gitignore vim swap files. February 12, 2014
Octocat-spinner-32 .travis.yml Stupid travis and its old versionness. June 27, 2013
Octocat-spinner-32 LICENSE Added a license August 21, 2013
Octocat-spinner-32 README.markdown Added installation instructions January 13, 2013
Octocat-spinner-32 client.go Moved gomemcached code back into go-couchbase. February 12, 2014
Octocat-spinner-32 client_test.go Handle WriteOptions masks when stringing January 17, 2014
Octocat-spinner-32 conn_pool.go Moved gomemcached code back into go-couchbase. February 12, 2014
Octocat-spinner-32 conn_pool_test.go Moved gomemcached code back into go-couchbase. February 12, 2014
Octocat-spinner-32 ddocs.go More doc/golint cleanup February 03, 2014
Octocat-spinner-32 pools.go Removed temporarily exported functions. February 12, 2014
Octocat-spinner-32 pools_test.go Some testing on connection pool replacement/fetching December 07, 2013
Octocat-spinner-32 tap.go Moved gomemcached code back into go-couchbase. February 12, 2014
Octocat-spinner-32 upr.go Bug fix in calculating start vector from failover log. February 25, 2014
Octocat-spinner-32 uprtrans.go Localized upr transport functions. February 13, 2014
Octocat-spinner-32 uprtrans_test.go Localized upr transport functions. February 13, 2014
Octocat-spinner-32 util.go doc/golint cleanup February 04, 2014
Octocat-spinner-32 util_test.go Use table for util tests January 28, 2014
Octocat-spinner-32 vbmap.go doc/golint cleanup February 04, 2014
Octocat-spinner-32 vbmap_test.go Atomically perform bucket refreshes October 23, 2013
Octocat-spinner-32 views.go doc/golint cleanup February 10, 2014
Octocat-spinner-32 views_test.go doc/golint cleanup February 10, 2014
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", []string{"an", "example", "list"})
Something went wrong with that request. Please try again.