Version: v0.2.1 Latest Latest

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 7 Imported by: 0



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



This section is empty.


View Source
var CassandraHost = ""


func CreateSchema

func CreateSchema()

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


type Config added in v0.1.0

type Config struct {
	Host     string                 `yaml:"host" json:"host"`
	Port     int                    `yaml:"port" json:"port"`
	Keyspace string                 `yaml:"keyspace" json:"keyspace"`
	XXX      map[string]interface{} `yaml:",inline"`

TODO: keyspace

func NewConfig added in v0.1.0

func NewConfig() Config

func (*Config) Apply added in v0.1.0

func (c *Config) Apply() error

func (*Config) UnmarshalYAML added in v0.1.0

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Config) Validate added in v0.1.0

func (c *Config) Validate() error

type Store

type Store struct {
	// contains filtered or unexported fields

Store contains a cassandra session

func CreateStore added in v0.1.0

func CreateStore(config Config) (*Store, error)

func NewCassandraStore

func NewCassandraStore(config Config) (*Store, error)

NewCassandraStore creates a new cassandra store connecting to localhost cassandra

func (Store) QueryIntSeries deprecated

This method has been deprecated.
func (store Store) QueryIntSeries(query common.Query) ([]common.IntSeries, error)

QueryIntSeries implements Store interface Deprecated: Use QueryIntSeriesBatch instead

func (Store) QueryIntSeriesBatch added in v0.0.2

func (store Store) QueryIntSeriesBatch(queries []common.Query) ([]common.QueryResult, []common.IntSeries, error)

QueryIntSeriesBatch implements Store interface

func (Store) QuerySeries added in v0.0.3

func (store Store) QuerySeries(queries []common.Query) ([]common.QueryResult, []common.Series, error)

func (Store) Shutdown

func (store Store) Shutdown()

func (Store) StoreType

func (store Store) StoreType() string

StoreType implements store interface

func (Store) WriteDoubleSeries added in v0.0.3

func (store Store) WriteDoubleSeries(series []common.DoubleSeries) error

WriteDoubleSeries 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL