2017-05-26 04:48:44 +08:00
fdb-go
======
2018-04-20 02:12:27 +08:00
[Go language ](http://golang.org ) bindings for [FoundationDB ](https://apple.github.io/foundationdb/index.html#documentation ), a distributed key-value store with ACID transactions.
2017-05-26 04:48:44 +08:00
This package requires:
2019-05-22 23:54:42 +08:00
- Go 1.11+ with CGO enabled
2018-08-21 09:04:35 +08:00
- [Mono ](http://www.mono-project.com/ ) (macOS or Linux) or [Visual Studio ](https://www.visualstudio.com/ ) (Windows) (build-time only)
2019-04-03 09:39:24 +08:00
- FoundationDB C API 2.0.x-6.1.x (part of the [FoundationDB client packages ](https://apple.github.io/foundationdb/downloads.html#c ))
2017-05-26 04:48:44 +08:00
2019-07-19 01:56:05 +08:00
Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-620.
2017-05-26 04:48:44 +08:00
2018-09-07 04:19:13 +08:00
To install this package, you can run the "fdb-go-install.sh" script (for versions 5.0.x and greater):
2017-07-06 05:59:00 +08:00
2018-09-07 04:19:13 +08:00
./fdb-go-install.sh install --fdbver < x.y.z >
2017-07-06 05:59:00 +08:00
The "install" command of this script does not depend on the presence of the repo in general and will download the repository into
your local go path. Running "localinstall" instead of "install" will use the local copy here (with a symlink) instead
of downloading from the remote repository.
2018-08-21 09:04:35 +08:00
You can also build this package, in the top level of this repository run:
make fdb_go
This will create binary packages for the appropriate platform within the "build" subdirectory of this folder.
2017-05-26 04:48:44 +08:00
Documentation
-------------
2018-03-31 02:16:19 +08:00
* [API documentation ](https://godoc.org/github.com/apple/foundationdb/bindings/go/src/fdb )
2019-03-18 01:21:03 +08:00
* [Tutorial ](https://apple.github.io/foundationdb/class-scheduling-go.html )
2019-02-13 01:56:31 +08:00
Modules
-------
2019-02-13 02:08:21 +08:00
If you used the bindings with modules before the addition of the `go.mod` file in the foundation repo,
2019-02-13 01:56:31 +08:00
it may be necessary to update the import path in your `go.mod` .
By default, a module enabled `go get` will add something like this to your `go.mod` :
github.com/apple/foundationdb vx.x.x-xxxxxxxxxxxxxx-xxxxxxxxxxxx
You will need to delete that line, then run `go get github.com/apple/foundationdb/bindings/go@version` .
You should now have a line like this in your `go.mod` :
github.com/apple/foundationdb/bindings/go vx.x.x-xxxxxxxxxxxxxx-xxxxxxxxxxxx
Note: `@version` is only necessary if you previously locked to a
specific version or commit, in which case you'd replace `version` with a commit hash or tag.