milvus/pkg/util/paramtable/hook_config.go
jaime c9d0c157ec
Move some modules from internal to public package (#22572)
Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-04-06 19:14:32 +08:00

42 lines
878 B
Go

package paramtable
import (
"go.uber.org/zap"
"github.com/milvus-io/milvus/pkg/log"
)
const hookYamlFile = "hook.yaml"
type hookConfig struct {
SoPath ParamItem `refreshable:"false"`
SoConfig ParamGroup `refreshable:"false"`
QueryNodePluginConfig ParamItem `refreshable:"true"`
}
func (h *hookConfig) init(base *BaseTable) {
hookBase := &BaseTable{YamlFiles: []string{hookYamlFile}}
hookBase.init(0)
log.Info("hook config", zap.Any("hook", hookBase.FileConfigs()))
h.SoPath = ParamItem{
Key: "soPath",
Version: "2.0.0",
DefaultValue: "",
}
h.SoPath.Init(hookBase.mgr)
h.SoConfig = ParamGroup{
KeyPrefix: "",
Version: "2.2.0",
}
h.SoConfig.Init(hookBase.mgr)
h.QueryNodePluginConfig = ParamItem{
Key: "autoindex.params.search",
Version: "2.3.0",
}
h.QueryNodePluginConfig.Init(base.mgr)
}