mirror of https://github.com/milvus-io/milvus.git
[skip ci]Fix golint error in distributed/querynode/param_table.go (#9639)
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/9703/head
parent
e2638a3232
commit
f73c04915b
|
@ -23,9 +23,12 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/util/paramtable"
|
||||
)
|
||||
|
||||
// Params is a package scoped variable of type ParamTable.
|
||||
var Params ParamTable
|
||||
var once sync.Once
|
||||
|
||||
// ParamTable is a derived struct of paramtable.BaseTable. It achieves Composition by
|
||||
// embedding paramtable.BaseTable. It is used to quickly and easily access the system configuration.
|
||||
type ParamTable struct {
|
||||
paramtable.BaseTable
|
||||
|
||||
|
@ -42,6 +45,7 @@ type ParamTable struct {
|
|||
ServerMaxRecvSize int
|
||||
}
|
||||
|
||||
// Init is used to initialize configuration items.
|
||||
func (pt *ParamTable) Init() {
|
||||
once.Do(func() {
|
||||
pt.BaseTable.Init()
|
||||
|
@ -59,10 +63,12 @@ func (pt *ParamTable) Init() {
|
|||
})
|
||||
}
|
||||
|
||||
// LoadFromArgs is used to initialize configuration items from args.
|
||||
func (pt *ParamTable) LoadFromArgs() {
|
||||
|
||||
}
|
||||
|
||||
// LoadFromEnv is used to initialize configuration items from env.
|
||||
func (pt *ParamTable) LoadFromEnv() {
|
||||
Params.QueryNodeIP = funcutil.GetLocalIP()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue