1

Getting into Go and Couchbase, and for the life of me cannot figure out how to create a new pool.

I've checked the code and what docs I could find, but no luck. I'm using the couchbaselabs/go-couchbase library with Couchbase Community Edition 2.2.0.

Greg M. Krsak
  • 2,102
  • 1
  • 18
  • 28

1 Answers1

4

Pools are more or less a dead feature in Couchbase 2.x, and the go-couchbase api doesn't implement a way to create a new pool.

What is a couchbase pool is relevant.

Community
  • 1
  • 1
OneOfOne
  • 95,033
  • 20
  • 184
  • 185
  • Thanks- I've seen that link and it's a good one. My problem may be that my Couchbase install doesn't have a "default" named pool; however, I **can** access /pools/default/buckets (which returns []) using curl. – Greg M. Krsak Aug 01 '14 at 20:53
  • post some code on how you connect and the exact error you get, please. – OneOfOne Aug 01 '14 at 20:56
  • 1
    The actual code is buried in a wrapper library, but it amounts to this: https://gist.github.com/gregkrsak/7e5f8cbcd501006d36ee – Greg M. Krsak Aug 01 '14 at 21:03
  • does using `GetBucket` instead of connect / GetPool does anything? – OneOfOne Aug 01 '14 at 21:07
  • I don't think that will work; if you notice, in the pools.go of the source, that GetBucket requires a pool name and then takes that name and calls GetPool with it. Ref: https://github.com/couchbaselabs/go-couchbase/blob/master/pools.go – Greg M. Krsak Aug 06 '14 at 19:17
  • Indeed, **couchbase.GetBucket("http://127.0.0.1:8091/", "default", "my_bucket")** gives me a *No pool named default* error. – Greg M. Krsak Aug 06 '14 at 19:42