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

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/9703/head
cai.zhang 2021-10-11 21:33:11 +08:00 committed by GitHub
parent e2638a3232
commit f73c04915b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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()
}