MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / NewSQLiteIPList

Function NewSQLiteIPList

internal/iplibrary/ip_list_sqlite.go:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func NewSQLiteIPList() (*SQLiteIPList, error) {
41 var db = &SQLiteIPList{
42 itemTableName: "ipItems",
43 versionTableName: "versions",
44 dir: filepath.Clean(Tea.Root + "/data"),
45 cleanTicker: time.NewTicker(24 * time.Hour),
46 }
47 err := db.init()
48 return db, err
49}
50
51func (this *SQLiteIPList) init() error {
52 // 检查目录是否存在

Callers 5

TestSQLiteIPList_AddItemFunction · 0.92
InitMethod · 0.85

Calls 2

CleanMethod · 0.45
initMethod · 0.45