milvus/internal/util/paramtable/hook_config.go
Gao 8b3e5189e1
Add querynode plugin (#22379)
Signed-off-by: chasingegg <chao.gao@zilliz.com>
2023-03-24 15:21:59 +08:00

41 lines
882 B
Go

package paramtable
import (
"github.com/milvus-io/milvus/internal/log"
"go.uber.org/zap"
)
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)
}