duanla1996
2015-03-16 21:04
浏览 69
已采纳

Golang Couchbase集成在设置/获取时引发错误

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")

图片转代码服务由CSDN问答提供 功能建议

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

但是-不管我做什么-使用各种类型的连接-设置/ 获取密钥。

  vbmap小于vbucket列表:18119与[] 
   
 
 

下面的代码示例(尝试了许多变体 )

  b,err:= benchbase.GetBucket(“ http:// somebucket:somepassword @ myserver:8091 /”,
“ default”,“ somebucket”)\  nmf(err,“ con”)
 
err = b.Set(“ somekey”,0,map [string] interface {} {“ x”:1})
 mf(err,“ set”)
    
 
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanji2002 2015-03-18 10:07
    已采纳

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

    点赞 评论

相关推荐 更多相似问题