Golang与Couchbase集成在设置/获取时出现错误。

huangapple go评论73阅读模式
英文:

Golang Couchbase integration throwing errors on setting/getting

问题

实施 https://github.com/couchbase/go-couchbase

然而,无论我做什么,无论使用何种类型的连接,当设置/获取键时都会出现错误。

以下是代码示例(尝试了许多变体):

b, err := couchbase.GetBucket("http://somebucket:somepassword@myserver:8091/",
       "default", "somebucket")
mf(err,"con")

err = b.Set("somekey", 0, map[string]interface{}{"x": 1})
mf(err, "set")
英文:

Implementing https://github.com/couchbase/go-couchbase

However - no matter what I do - with various types of connections - I get errors when setting/getting keys.

vbmap smaller than vbucket list: 18119 vs. []

Code Example below (have tried many variations)

b, err := couchbase.GetBucket("http://somebucket:somepassword@myserver:8091/",
       "default", "somebucket")
mf(err,"con")

err = b.Set("somekey", 0, map[string]interface{}{"x": 1})
  mf(err, "set")

答案1

得分: 1

你可能正在尝试连接到一个 memcached 存储桶。go-couchbase 不支持 memcached 类型的存储桶。

英文:

You are probably trying to connect to a memcached bucket. go-couchbase doesn't support buckets of type memcached.

huangapple
  • 本文由 发表于 2015年3月17日 05:04:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/29086913.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定