Documentation
¶
Index ¶
- func BloomBitsPerKey(numEntries int, fp float64) int
- func CalculateChecksum(data []byte) uint64
- func FID(name string) uint64
- func FileNameSSTable(dir string, id uint64) string
- func Hash(b []byte) uint32
- func LoadIDMap(dir string) map[uint64]struct{}
- func SyncDir(dir string) error
- func VerifyChecksum(data []byte, expected []byte) error
- func VlogFilePath(dirPath string, fid uint32) string
- type Closer
- type FileOptions
- type Filter
- type Throttle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BloomBitsPerKey ¶
BloomBitsPerKey returns the bits per key required by bloomfilter based on the false positive rate.
func CalculateChecksum ¶
func FileNameSSTable ¶
func VerifyChecksum ¶
func VlogFilePath ¶
Types ¶
type Closer ¶
type Closer struct { CloseSignal chan struct{} // contains filtered or unexported fields }
func (*Closer) CloseAndWait ¶
func (c *Closer) CloseAndWait()
type FileOptions ¶
type Filter ¶
type Filter []byte
func NewFilter ¶
NewFilter returns a new Bloom filter that encodes a set of []byte keys with the given number of bits per key, approximately.
A good bitsPerKey value is 10, which yields a filter with ~ 1% false positive rate.
func (Filter) MayContain ¶
MayContain returns whether the filter may contain given key. False positives are possible, where it returns true for keys not in the original set.
func (Filter) MayContainKey ¶
type Throttle ¶
type Throttle struct {
// contains filtered or unexported fields
}
func NewThrottle ¶
Click to show internal directories.
Click to hide internal directories.