Golang Client for Cassandra

I am looking for a golang client for Cassandra with unit testing support. I found several libraries like

  • Goosie (no longer supported)
  • gocql (any client library without testing support is useless to me)
  • gocassa (same question as above)

Can someone suggest me any client lib that has what I'm looking for?

+6
source share
1 answer

This is a very simple example of what I meant in the comments:

type CassAPI interface { GetFoo(rowKey string) (someType, error) } type CassWrapper struct { cass *gocql.Session } func (cw *CassWrapper) GetFoo(rowKey string) (someType, error) { // do things with cw.cass return someType } 

The application code uses an instance of CassWrapper, and the tests will use an instance of some layout or stub that is bound to the same CassAPI interface.

+2
source

All Articles