mirror of
https://github.com/spf13/viper
synced 2024-12-22 11:37:02 +00:00
feat: add etcd3 support to remote
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
2080d43fa5
commit
433821fa47
1 changed files with 4 additions and 0 deletions
|
@ -85,6 +85,8 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
|
||||||
switch rp.Provider() {
|
switch rp.Provider() {
|
||||||
case "etcd":
|
case "etcd":
|
||||||
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
|
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
|
case "etcd3":
|
||||||
|
cm, err = crypt.NewEtcdV3ConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
case "firestore":
|
case "firestore":
|
||||||
cm, err = crypt.NewFirestoreConfigManager([]string{rp.Endpoint()}, kr)
|
cm, err = crypt.NewFirestoreConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
default:
|
default:
|
||||||
|
@ -94,6 +96,8 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
|
||||||
switch rp.Provider() {
|
switch rp.Provider() {
|
||||||
case "etcd":
|
case "etcd":
|
||||||
cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()})
|
cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()})
|
||||||
|
case "etcd3":
|
||||||
|
cm, err = crypt.NewStandardEtcdV3ConfigManager([]string{rp.Endpoint()})
|
||||||
case "firestore":
|
case "firestore":
|
||||||
cm, err = crypt.NewStandardFirestoreConfigManager([]string{rp.Endpoint()})
|
cm, err = crypt.NewStandardFirestoreConfigManager([]string{rp.Endpoint()})
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue