2017-08-22 13:07
浏览 92

在Golang应用程序中使用Couchbase Lite(不是Couchbase Server)

I'm wondering if anyone has ever tried to use Couchbase Lite (not Couchbase Server) in a Golang application. In other words building it into a Golang binary?

I came across this library Couchbase Lite Core and through a quick read, it looks like the underlying library for Couchbase Lite (I stand corrected)? What I couldn't find though was how to use it.

Has anyone tried to make this work with something like cgo perhaps? I'm looking to build it statically into the application so it doesn't have dependencies when distributed.

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

我想知道是否有人尝试过在Golang应用程序中使用Couchbase Lite(而非Couchbase Server)。 换句话说,将其构建为Golang二进制文件吗?

我遇到了这个库 Couchbase Lite核心,并通过快速阅读,看起来像Couchbase Lite的基础库(我已纠正)? 我找不到的是如何使用它。

也许有人尝试使用 cgo 之类的东西来使其工作吗? 我希望将其静态地构建到应用程序中,以便在分发时不具有依赖项。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • doulao7998636570 2017-08-27 06:42

    Lite Core is the underlying implementation of the upcoming 2.0 version of Couchbase Lite. It's still under development. The intention is to have a common core, with platform and language specific bindings on top.

    There is currently no Go implementation I'm aware of. cgo does look like an option. Given the goal of Lite Core being the underlying implementation for all platforms, this seems on its face like a reasonable approach.

    If you're interested, there's a GitHub account for community projects at If you work on this, it would be great to have it included there.

    To see an example of platform integration, take a look at

    点赞 打赏 评论
  • doushai4890 2017-08-23 20:39

    I haven't tried embedding Couchbase Lite, but my team and I make extensive use of embedded datastores like BoltDB Assuming you aren't using Couchbase's replication features heavily, BoltDB may meet your requirements.

    点赞 打赏 评论

相关推荐 更多相似问题