未验证 提交 f73c0491 编写于 作者: C cai.zhang 提交者: GitHub

[skip ci]Fix golint error in distributed/querynode/param_table.go (#9639)

Signed-off-by: Ncai.zhang <cai.zhang@zilliz.com>
上级 e2638a32
......@@ -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()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册