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

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

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

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

展开原文

原文

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.

cgo

2个回答



Lite Core是即将推出的Couchbase Lite 2.0版本的基础实现。 它仍在开发中。 目的是要有一个公共核心,并在平台和语言特定的绑定之上。</ p>

我目前不知道Go的实现。 cgo </ code>看起来确实像一个选项。 鉴于Lite Core的目标是所有平台的基础实现,因此从表面上看,这似乎是一种合理的方法。</ p>

如果您有兴趣,可以在< a href =“ https://github.com/couchbaselabs” rel =“ nofollow noreferrer”> https://github.com/couchbaselabs 。 如果您要进行此工作,最好将它包含在其中。</ p>

要查看平台集成的示例,请查看 https://github.com/couchbase/couchbase-lite-ios/tree/feature/2.0 </ p>
</ div>

展开原文

原文

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 https://github.com/couchbaselabs. 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 https://github.com/couchbase/couchbase-lite-ios/tree/feature/2.0

douji9184
douji9184 似乎还没有Go实现,因此我将其标记为关闭线程的答案。
大约 3 年之前 回复



我还没有尝试嵌入Couchbase Lite,但是我和我的团队广泛使用了诸如 BoltDB 假设您没有大量使用Couchbase的复制功能,则BoltDB可能会满足您的要求。</ p>
</ div>

展开原文

原文

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.

douhao3562
douhao3562 由于事务锁定/死锁,我发现BoltDB非常难以忍受。
接近 3 年之前 回复
dongying3744
dongying3744 实际上,复制的东西是我考虑它的原因。
大约 3 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问