Documentation
¶
Overview ¶
package bloom creates and serves bloom filters for canonical names, and names of viruses. The filters are persistent throughout the life of the program. The filters are used to find exact matches to the database data fast.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filters ¶
type Filters struct {
// Canonical is a filter for matching with canonical names.
Canonical *baseBloomfilter.Bloomfilter
// CanonicalSize is number of entries in 'simple' canonical filter. It is
// used as an option during Canonical filter creation.
CanonicalSize uint
// Virus is a filter for matching with viruses names.
Virus *baseBloomfilter.Bloomfilter
// VirusesSize is a number of entries if 'viruses' filter.
VirusSize uint
// Mux is a mutex for thread-safe operations
Mux sync.Mutex
}
Filters contain bloom filters data we use for matching.
func GetFilters ¶
GetFilters returns bloom filters for name-string matching. If filters had been already created before, it just returns them. Otherwise it creates filters from either database, or from cached files. Creating filters from cache is significantly faster.
Click to show internal directories.
Click to hide internal directories.