Documentation ¶
Index ¶
- Variables
- func CurrentTimeMillis() int64
- func GetBytes(key interface{}) ([]byte, error)
- func Hash(key interface{}) uint64
- func LoggerInstance() *log.Logger
- type APHash
- type BKDRHash
- type BPHash
- type BloomFilter
- type BloomFilterSerializer
- type BoundedStatsDeque
- func (p *BoundedStatsDeque) Add(o float64)
- func (p *BoundedStatsDeque) Clear()
- func (p *BoundedStatsDeque) Mean() float64
- func (p *BoundedStatsDeque) Size() int
- func (p *BoundedStatsDeque) Stdev() float64
- func (p *BoundedStatsDeque) Sum() float64
- func (p *BoundedStatsDeque) SumOfDeviations() float64
- func (p *BoundedStatsDeque) Variance() float64
- type DEKHash
- type DJBHash
- type ELFHash
- type FNVHash
- type ISimpleHash
- type JSHash
- type PJWHash
- type RSHash
- type SDBMHash
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BFSerializer ... BFSerializer = NewBloomFilterSerializer() )
View Source
var (
Logger *log.Logger
)
Logger ...
Functions ¶
Types ¶
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
BloomFilter provides an approach to quickly check whether a key is stored inside some file
func NewBloomFilter ¶
func NewBloomFilter(numElements, bitsPerElement int) *BloomFilter
NewBloomFilter gives out a new instance of bf
func NewBloomFilterDS ¶
func NewBloomFilterDS(hashes int32, filter *bitset.BitSet) *BloomFilter
NewBloomFilterDS creates a bf deserialized from data
func NewBloomFilterS ¶
func NewBloomFilterS(count, hashes, bitsize int32, bs *bitset.BitSet) *BloomFilter
NewBloomFilterS creates a bf deserialized from data
func (*BloomFilter) IsPresent ¶
func (b *BloomFilter) IsPresent(key string) bool
IsPresent checks whether a key exists
func (*BloomFilter) ToByteArray ¶
func (b *BloomFilter) ToByteArray() []byte
ToByteArray serializes this bf
type BloomFilterSerializer ¶
type BloomFilterSerializer struct{}
BloomFilterSerializer ...
func NewBloomFilterSerializer ¶
func NewBloomFilterSerializer() *BloomFilterSerializer
NewBloomFilterSerializer ...
func (*BloomFilterSerializer) Deserialize ¶
func (b *BloomFilterSerializer) Deserialize(dis *os.File) *BloomFilter
Deserialize ...
func (*BloomFilterSerializer) DeserializeB ¶
func (b *BloomFilterSerializer) DeserializeB(dis []byte) *BloomFilter
DeserializeB deserialize bloom filter from bytes
func (*BloomFilterSerializer) Serialize ¶
func (b *BloomFilterSerializer) Serialize(bf *BloomFilter, dos *os.File)
Serialize ...
func (*BloomFilterSerializer) SerializeB ¶
func (b *BloomFilterSerializer) SerializeB(bf *BloomFilter, dos []byte)
SerializeB serialize bloom filter to byte slice
type BoundedStatsDeque ¶
type BoundedStatsDeque struct {
// contains filtered or unexported fields
}
BoundedStatsDeque ...
func NewBoundedStatsDeque ¶
func NewBoundedStatsDeque(size int) *BoundedStatsDeque
NewBoundedStatsDeque ...
func (*BoundedStatsDeque) SumOfDeviations ¶
func (p *BoundedStatsDeque) SumOfDeviations() float64
SumOfDeviations ...
type ISimpleHash ¶
type ISimpleHash interface {
// contains filtered or unexported methods
}
ISimpleHash provides an interface for hash functions
Click to show internal directories.
Click to hide internal directories.