badger

package
v0.0.0-...-75a2702 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	*badger.DB
}

func (*Indexer) Begin

func (idx *Indexer) Begin() storage.Tx

func (*Indexer) Get

func (idx *Indexer) Get(k string) (*storage.DataPoint, error)

Get the most recent entry for k

func (*Indexer) GetAll

func (idx *Indexer) GetAll(k string, count int) ([]storage.DataPoint, error)

GetAll return all entries for k up to count

func (*Indexer) Keys

func (idx *Indexer) Keys() ([]string, error)

Keys list all keys

func (*Indexer) RadiusSearch

func (idx *Indexer) RadiusSearch(lat, lng, radius float64) ([]storage.DataPoint, error)

RadiusSearch returns the Points found in the index inside radius (no data)

func (*Indexer) RectSearch

func (idx *Indexer) RectSearch(urlat, urlng, bllat, bllng float64) ([]storage.DataPoint, error)

RectPointSearch returns all Points contained in the rect

func (*Indexer) Store

func (idx *Indexer) Store(k string, v []byte, lat, lng float64, t time.Time) error

Store is storing k and v but also geoindex at lat lng

func (*Indexer) StoreTx

func (idx *Indexer) StoreTx(txi storage.Tx, k string, v []byte, lat, lng float64, t time.Time) error

StoreTx is storing k and v but also geoindex at lat lng for the most recent entry

Jump to

Keyboard shortcuts

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