Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (22 sloc) 0.915 kb
8486a7c @dustin Added a README.
dustin authored
1 # A smart client for couchbase in go
2
3 This is an evolving package, but does provide a useful interface to a
4 [couchbase](http://www.couchbase.com/) server including all of the
5 pool/bucket discovery features, compatible key distribution with other
6 clients, and vbucket motion awareness so application can continue to
7 operate during rebalances.
8
9 It also supports view querying with source node randomization so you
10 don't bang on all one node to do all the work.
11
12 ## Example
13
14 c, err := couchbase.Connect("http://dev-couchbase.example.com:8091/")
15 if err != nil {
16 log.Fatalf("Error connecting: %v", err)
17 }
18
19 pool, err := c.GetPool("default")
20 if err != nil {
21 log.Fatalf("Error getting pool: %v", err)
22 }
23
24 bucket, err := pool.GetBucket("default")
25 if err != nil {
26 log.Fatalf("Error getting bucket: %v", err)
27 }
28
29 bucket.Set("someKey", []string{"an", "example", "list"})
Something went wrong with that request. Please try again.