Documentation ¶
Index ¶
- Constants
- func CheckIP(ip string) (uint32, error)
- func LoadContent(handle *os.File) ([]byte, error)
- func LoadContentFromFile(dbFile string) ([]byte, error)
- func LoadVectorIndex(handle *os.File) ([]byte, error)
- func LoadVectorIndexFromFile(dbFile string) ([]byte, error)
- func Long2IP(ip uint32) string
- func MidIP(sip uint32, eip uint32) uint32
- type Header
- type IndexPolicy
- type IpInfo
- type Searcher
Constants ¶
View Source
const ( HeaderInfoLength = 256 VectorIndexRows = 256 VectorIndexCols = 256 VectorIndexSize = 8 SegmentIndexBlockSize = 14 )
Variables ¶
This section is empty.
Functions ¶
func LoadContent ¶
LoadContent load the whole xdb content from the specified file handle
func LoadContentFromFile ¶
LoadContentFromFile load the whole xdb content from the specified db file path
func LoadVectorIndex ¶
LoadVectorIndex util function to load the vector index from the specified file handle
func LoadVectorIndexFromFile ¶
LoadVectorIndexFromFile load vector index from a specified file path
Types ¶
type Header ¶
type Header struct { // data []byte Version uint16 IndexPolicy IndexPolicy CreatedAt uint32 StartIndexPtr uint32 EndIndexPtr uint32 }
func LoadHeader ¶
LoadHeader load the header info from the specified handle
func LoadHeaderFromBuff ¶
LoadHeaderFromBuff wrap the header info from the content buffer
func LoadHeaderFromFile ¶
LoadHeaderFromFile load header info from the specified db file path
type IndexPolicy ¶
type IndexPolicy int
const ( VectorIndexPolicy IndexPolicy = 1 BTreeIndexPolicy IndexPolicy = 2 )
func (IndexPolicy) String ¶
func (i IndexPolicy) String() string
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
func NewWithBuffer ¶
func NewWithFileOnly ¶
func (*Searcher) GetIOCount ¶
GetIOCount return the global io count for the last search
func (*Searcher) SearchByCustomInfo ¶
Click to show internal directories.
Click to hide internal directories.