mirror of https://github.com/milvus-io/milvus.git
[skip ci]Fix golint in indexnode/param_table.go (#8975)
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/9011/head
parent
ed6101198b
commit
fcdb79ffe8
|
@ -28,6 +28,7 @@ const (
|
|||
StartParamsKey = "START_PARAMS"
|
||||
)
|
||||
|
||||
// ParamTable is used to record configuration items.
|
||||
type ParamTable struct {
|
||||
paramtable.BaseTable
|
||||
|
||||
|
@ -54,6 +55,7 @@ type ParamTable struct {
|
|||
UpdatedTime time.Time
|
||||
}
|
||||
|
||||
// Params is an alias for ParamTable.
|
||||
var Params ParamTable
|
||||
var once sync.Once
|
||||
|
||||
|
@ -61,6 +63,7 @@ func (pt *ParamTable) InitAlias(alias string) {
|
|||
pt.Alias = alias
|
||||
}
|
||||
|
||||
// Init is used to initialize configuration items.
|
||||
func (pt *ParamTable) Init() {
|
||||
pt.BaseTable.Init()
|
||||
if err := pt.LoadYaml("advanced/knowhere.yaml"); err != nil {
|
||||
|
@ -77,6 +80,7 @@ func (pt *ParamTable) Init() {
|
|||
pt.initKnowhereSimdType()
|
||||
}
|
||||
|
||||
// InitOnce is used to initialize configuration items, and it will only be called once.
|
||||
func (pt *ParamTable) InitOnce() {
|
||||
once.Do(func() {
|
||||
pt.Init()
|
||||
|
|
Loading…
Reference in New Issue