bcache

package
v0.0.0-...-1b5f0b1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: GPL-3.0 Imports: 9 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 struct that "caches" timeseries keys. It uses boltdb as persistence

func (*Bcache) Get

func (bc *Bcache) Get(ksts string) bool

func (*Bcache) GetKeyspace

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

GetKeyspace returns a keyspace key, a boolean that tells whether 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)

func (*Bcache) Set

func (bc *Bcache) Set(key string)

type KV

type KV struct {
	K []byte
	V []byte
}

Jump to

Keyboard shortcuts

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