英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论