Skip to main content

Installing the Aerospike Go Client

This describes installing the Aerospike Go client.

Prerequisites

  • Go version v1.9+.

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, Redhat)
  • macOS
  • Windows (untested)

Installing

  1. Install Go v1.9+ and setup your environment as documented here. Your package manager may also have go. To see if go is installed and working, try go version.
  2. Get the client in your $GOPATH:
go get github.com/aerospike/aerospike-client-go/v6
  1. Update the client library:
go get -u github.com/aerospike/aerospike-client-go/v6

Testing

The Aerospike Go client package contains a number of tests.

Tests require Ginkgo and Gomega library.

go get github.com/onsi/ginkgo
go get github.com/onsi/gomega

Before running the tests, update dependencies:

cd $GOPATH/src/github.com/aerospike/aerospike-client-go/tools/benchmark
go get .

To run all test cases with race detection:

ginkgo -r -race -- -h 127.0.0.1 -p 3000