cassandra

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cassandra provides the functionality to use Cssandra as long term and distributed storage

Index

Constants

This section is empty.

Variables

View Source
var CassandraHost = "127.0.0.1"

Functions

func CreateSchema

func CreateSchema()

CreateSchema use naive with tag schema TODO: allow passing different configuration

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store contains a cassandra session

func GetDefaultCassandraStore

func GetDefaultCassandraStore(cassandraHost string) *Store

GetDefaultCassandraStore will connect to cassandra if it is not found NOTE: we don't do it in init because it would break other stores, mem, mysql etc. TODO: we should return error and allow retry etc.

func NewCassandraStore

func NewCassandraStore(cassandraHost string) *Store

NewCassandraStore creates a new cassandra store connecting to localhost cassandra

func (Store) QueryIntSeries

func (store Store) QueryIntSeries(query common.Query) ([]common.IntSeries, error)

QueryIntSeries implements Store interface

func (Store) Shutdown

func (store Store) Shutdown()

func (Store) StoreType

func (store Store) StoreType() string

StoreType implements store interface

func (Store) WriteIntSeries

func (store Store) WriteIntSeries(series []common.IntSeries) error

WriteIntSeries implements Store interface

type StoreMap

type StoreMap struct {
	// contains filtered or unexported fields
}

StoreMap is used to allow multiple cassandra session, it is also used as a singleton when you are just using the default store. its methods use a RWMutex

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL