milvus/internal/util/paramtable/hook_config.go
SimFG bddda5bdb2
Only print the file content when log the hook.yaml (#22361)
Signed-off-by: SimFG <bang.fu@zilliz.com>
2023-02-23 15:33:45 +08:00

33 lines
614 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"`
}
func (h *hookConfig) init() {
base := &BaseTable{YamlFile: hookYamlFile}
base.init(0)
log.Info("hook config", zap.Any("hook", base.FileConfigs()))
h.SoPath = ParamItem{
Key: "soPath",
Version: "2.0.0",
DefaultValue: "",
}
h.SoPath.Init(base.mgr)
h.SoConfig = ParamGroup{
KeyPrefix: "",
Version: "2.2.0",
}
h.SoConfig.Init(base.mgr)
}