mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
27 lines
468 B
Go
27 lines
468 B
Go
|
package paramtable
|
||
|
|
||
|
const hookYamlFile = "hook.yaml"
|
||
|
|
||
|
type HookConfig struct {
|
||
|
Base *BaseTable
|
||
|
SoPath string
|
||
|
SoConfig map[string]string
|
||
|
}
|
||
|
|
||
|
func (h *HookConfig) init() {
|
||
|
h.Base = &BaseTable{YamlFile: hookYamlFile}
|
||
|
h.Base.Init()
|
||
|
|
||
|
h.initSoPath()
|
||
|
h.initSoConfig()
|
||
|
}
|
||
|
|
||
|
func (h *HookConfig) initSoPath() {
|
||
|
h.SoPath = h.Base.LoadWithDefault("soPath", "")
|
||
|
}
|
||
|
|
||
|
func (h *HookConfig) initSoConfig() {
|
||
|
// all keys have been set lower
|
||
|
h.SoConfig = h.Base.Configs()
|
||
|
}
|