Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
BloomFilter contains the information for a BloomFilter data store.
func (*BloomFilter) Add ¶
func (bf *BloomFilter) Add(data []byte)
Add adds the data to the BloomFilter.
func (*BloomFilter) Export ¶
func (bf *BloomFilter) Export() ([]byte, error)
Export the filter as JSON
func (*BloomFilter) Test ¶
func (bf *BloomFilter) Test(data []byte) bool
Test returns a bool if the data is in the BloomFilter. True indicates that the data may be in the BloomFilter, while false indicates that the data is not in the BloomFilter.
type ExportInterface ¶
type ExportInterface struct { Size uint64 `json:"size"` Bits []uint8 `json:"bits"` Hash uint64 `json:"hash"` }
ExportInterface contains the structure of the JSON export
Click to show internal directories.
Click to hide internal directories.