bcache

package
v0.0.0-...-1809aa5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bcache

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

Bcache is responsible for caching timeseries keys from elasticsearch

func New

func New(sts *tsstats.StatsTS, ks *keyspace.Keyspace, path string) (*Bcache, gobol.Error)

New creates a a struct that "caches" timeseries keys. It uses boltdb as persistence

func (*Bcache) GetKeyspace

func (bc *Bcache) GetKeyspace(key string) (string, bool, gobol.Error)

GetKeyspace returns a keyspace key, a boolean that tells if the key was found or not and an error. If the key isn't in boltdb GetKeyspace tries to fetch the key from cassandra, and if found, puts it in boltdb.

func (*Bcache) GetTsNumber

func (bc *Bcache) GetTsNumber(key string, CheckTSID func(esType, id string) (bool, gobol.Error)) (bool, gobol.Error)

func (*Bcache) GetTsText

func (bc *Bcache) GetTsText(key string, CheckTSID func(esType, id string) (bool, gobol.Error)) (bool, gobol.Error)

Jump to

Keyboard shortcuts

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