milvus/internal/util/segcore/segcore_init.go
Zhen Ye c6dcef7b84
enhance: move segcore codes of segment into one package (#37722)
issue: #33285

- move most cgo opeartions related to search/query into segcore package
for reusing for streamingnode.
- add go unittest for segcore operations.

Signed-off-by: chyezh <chyezh@outlook.com>
2024-11-29 10:22:36 +08:00

25 lines
576 B
Go

package segcore
/*
#cgo pkg-config: milvus_core
#include "segcore/segcore_init_c.h"
*/
import "C"
// IndexEngineInfo contains all the information about the index engine.
type IndexEngineInfo struct {
MinIndexVersion int32
CurrentIndexVersion int32
}
// GetIndexEngineInfo returns the minimal and current version of the index engine.
func GetIndexEngineInfo() IndexEngineInfo {
cMinimal, cCurrent := C.GetMinimalIndexVersion(), C.GetCurrentIndexVersion()
return IndexEngineInfo{
MinIndexVersion: int32(cMinimal),
CurrentIndexVersion: int32(cCurrent),
}
}