internal

package
v0.0.0-...-a6b6bab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package internal @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License

Package internal @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeMemoryBuffer

func InitializeMemoryBuffer(dbPath string) (searcher *xdb.Searcher)

InitializeMemoryBuffer 可以预先加载整个 ip2region.xdb 到内存,完全基于内存查询,类似于之前的 memory search 查询。

func InitializeVectorIndex

func InitializeVectorIndex(dbPath string) (searcher *xdb.Searcher)

InitializeVectorIndex 可以预先加载 vecotorIndex 缓存,然后做成全局变量, 每次创建 searcher 的时候使用全局的 vectorIndex,可以减少一次固定的 IO 操作从而加速查询,减少系统 io 压力。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL