nubrin

package
v0.0.0-...-15b7eb6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte) (i uint64)

func Encode

func Encode(V uint64) []byte

func SplitOff

func SplitOff(b []byte) (n, r []byte)

func SplitOffSecond

func SplitOffSecond(b []byte) (n, r []byte)

Types

type BrinElement

type BrinElement []BrinNode

func (BrinElement) Len

func (b BrinElement) Len() int

func (BrinElement) Less

func (b BrinElement) Less(i, j int) bool

func (BrinElement) Swap

func (b BrinElement) Swap(i, j int)

type BrinNode

type BrinNode struct {
	IRMin uint64
	IRMax uint64
	KRMin uint64
	KRMax uint64
	Count uint64
}

func (*BrinNode) DecodeMsgpack

func (b *BrinNode) DecodeMsgpack(src *msgpack.Decoder) error

func (*BrinNode) Distance

func (b *BrinNode) Distance(c *BrinNode) uint64

func (*BrinNode) DistanceLog

func (b *BrinNode) DistanceLog(c *BrinNode) float64

func (*BrinNode) EncodeMsgpack

func (b *BrinNode) EncodeMsgpack(dst *msgpack.Encoder) error

func (BrinNode) FillFactorLog

func (b BrinNode) FillFactorLog() float64

Log2(length/count)

func (*BrinNode) Length

func (b *BrinNode) Length() uint64

func (*BrinNode) Merge

func (b *BrinNode) Merge(c *BrinNode)

func (*BrinNode) Single

func (b *BrinNode) Single(I, K uint64)

type BrinStruct

type BrinStruct struct {
	Low, High uint64
	Elems     BrinElement
	// contains filtered or unexported fields
}

type TSIndex

type TSIndex struct {
	Index, Table *bolt.Bucket
	Mod          uint64
	// contains filtered or unexported fields
}

func (*TSIndex) DeleteExpire

func (t *TSIndex) DeleteExpire(ctx context.Context, now uint64, consumer func([]byte)) error

func (*TSIndex) Insert

func (t *TSIndex) Insert(k, e uint64, v []byte) error

func (*TSIndex) Lookup

func (t *TSIndex) Lookup(k uint64) (uint64, []byte)

func (*TSIndex) Search

func (t *TSIndex) Search(ctx context.Context, e uint64, ch chan<- TSRecord) error

type TSRecord

type TSRecord struct {
	K, E  uint64
	Value []byte
}

Jump to

Keyboard shortcuts

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