nekorocks

package
v0.0.0-...-39e466c Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2014 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Merge Operator Provides Atomic Updates

Index

Constants

View Source
const (
	TS_KEY_LEN             = 15
	SERIES_META_PREFIX_LEN = 4
	SERIES_KEY_PREFIX_LEN  = 1
	KEY_SERIES_NAME        = "srs_name"
	KEY_SERIES_ID          = "srs_id"
	KEY_SERIES_FRAG_LEVEL  = "srs_fragLevel"
	KEY_SERIES_ELEM_COUNT  = "elm_count"
	PREFIX_SERIES_KEY_MAP  = "key_"
)

Variables

View Source
var (
	DB_PATH   string
	NotInited = errors.New("Not Initialized")
)
View Source
var (
	InvalidTimestamp = errors.New("Invalid Binary Timestamp")
)

Functions

func InitNekoRocks

func InitNekoRocks(dbpath string, _logger *gologging.Logger)

Types

type RocksDB

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

func NewRocksDB

func NewRocksDB(path string, opt *gorocksdb.Options) (*RocksDB, error)

func (*RocksDB) Close

func (r *RocksDB) Close()

func (*RocksDB) Delete

func (r *RocksDB) Delete(key []byte) error

func (*RocksDB) Destroy

func (r *RocksDB) Destroy() error

func (*RocksDB) Get

func (r *RocksDB) Get(key []byte) (*gorocksdb.Slice, error)

func (*RocksDB) Merge

func (r *RocksDB) Merge(key, value []byte) error

func (*RocksDB) NewIterator

func (r *RocksDB) NewIterator() *gorocksdb.Iterator

func (*RocksDB) Put

func (r *RocksDB) Put(key, value []byte) error

func (*RocksDB) PutSync

func (r *RocksDB) PutSync(key, value []byte) error

func (*RocksDB) Write

func (r *RocksDB) Write(batch *gorocksdb.WriteBatch) error

type Series

type Series struct {
	Name      string
	Id        string
	FragLevel int
	// contains filtered or unexported fields
}

func GetSeries

func GetSeries(id string) (*Series, error)

func NewSeries

func NewSeries(name, id string, fragLevel int) (*Series, error)

func (*Series) Count

func (s *Series) Count() (int, error)

func (*Series) Destroy

func (s *Series) Destroy() error

func (*Series) Insert

func (s *Series) Insert(key, value []byte, priority uint8) error

func (*Series) InsertBatch

func (s *Series) InsertBatch(records []*nekolib.NekodRecord, priority uint8) error

func (*Series) RangeOp

func (s *Series) RangeOp(start, end []byte, priority uint8, op func(key, value []byte))

func (*Series) ReverseHash

func (s *Series) ReverseHash(h uint32, ts_start, ts_end []byte) error

Jump to

Keyboard shortcuts

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