Install the Aerospike client
Prerequisites
- Go version v1.21+.
To install the latest stable version of Go, see http://golang.org/dl/. Your package manager may also have go
. To see if go
is installed and working, try go version
.
The Aerospike Go client implements the Aerospike network protocols in pure Go, and does not depend on the C client. It is goroutine friendly, and works asynchronously.
Supported operating systems:
- Major Linux distributions (Ubuntu, Debian, Red Hat, Amazon)
- macOS
- Windows (untested)
Installation
-
Install Go v1.21 or later and set up your environment as documented here. Your package manager may offer another way to install Go. To see if Go is installed and working, run
go version
at the command line. -
Fetch the Aerospike Go client from GitHub:
Terminal window go get github.com/aerospike/aerospike-client-go/v8 -
Update the client library:
Terminal window go get -u github.com/aerospike/aerospike-client-go/v8
Testing
The Aerospike Go client package contains a number of tests.
Tests require Ginkgo and Gomega library.
go get github.com/onsi/ginkgogo get github.com/onsi/gomega
Before running the tests, update dependencies:
cd $GOPATH/src/github.com/aerospike/aerospike-client-go/tools/benchmarkgo get .
To run all test cases with race detection:
ginkgo -r -race -- -h 127.0.0.1 -p 3000