enhance: Expose configs Manager (#41586)

See also: #41585

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
XuanYang-cn 2025-04-29 17:12:57 +08:00 committed by GitHub
parent cd60b965c8
commit 6b08eff4fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -300,3 +300,7 @@ func (bt *BaseTable) Reset(key string) error {
bt.mgr.EvictCachedValue(key) bt.mgr.EvictCachedValue(key)
return nil return nil
} }
func (bt *BaseTable) Manager() *config.Manager {
return bt.mgr
}

View File

@ -314,6 +314,22 @@ We recommend using version 1.2 and above.`,
p.EtcdAuthPassword.Init(base.mgr) p.EtcdAuthPassword.Init(base.mgr)
} }
func (p *EtcdConfig) GetAll() map[string]string {
return map[string]string{
"etcd.endpoints": p.Endpoints.GetValue(),
"etcd.metaRootPath": p.MetaRootPath.GetValue(),
"etcd.ssl.enabled": p.EtcdUseSSL.GetValue(),
"etcd.ssl.tlsCert": p.EtcdTLSCert.GetValue(),
"etcd.ssl.tlsKey": p.EtcdTLSKey.GetValue(),
"etcd.ssl.tlsCACert": p.EtcdTLSCACert.GetValue(),
"etcd.ssl.tlsMinVersion": p.EtcdTLSMinVersion.GetValue(),
"etcd.requestTimeout": p.RequestTimeout.GetValue(),
"etcd.auth.enabled": p.EtcdEnableAuth.GetValue(),
"etcd.auth.userName": p.EtcdAuthUserName.GetValue(),
"etcd.auth.password": p.EtcdAuthPassword.GetValue(),
}
}
// ///////////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////////
// --- tikv --- // --- tikv ---
type TiKVConfig struct { type TiKVConfig struct {