想知道字節(jié)用什么分布式配置中心呢,作為golang大廠,應該不是沿用JAVA的配置中心吧?
作者: 發(fā)布日期:2025-06-25 17:05:13
介紹一個我當初在鵝廠寫過的吧。
完全的云原生環(huán)境下的配置管理。
結(jié)合 直接上代碼給你看看吧。
type MyConf struct { TestKey1 string `cm:"testKey1"` TestKey2 int `cm:"testKey2"` TestKey3 struct { SubKey1 string `yaml:"subKey1"` SubKey2 int `yaml:"subKey2"` SubKey3 []string `yaml:"subKey3"` } `cm:"testKey3"` } func (c *MyConf) CMName() string { return "cm-op-config-test" } 使用? myConf := &My…。









