Handle HTTP/HTTPS protocol depending on dev env or not

This commit is contained in:
2022-11-07 01:35:06 +01:00
parent 356bfc6a86
commit e2ff98094b
6 changed files with 44 additions and 3 deletions

View File

@@ -20,10 +20,14 @@ func NewEtcdKVStore(cfg *viper.Viper) (EtcdKVStore, error) {
var (
endpoints = cfg.GetStringSlice("storage.kv.etcd.endpoints")
prefix = cfg.GetString("storage.kv.etcd.prefix")
username = cfg.GetString("storage.kv.etcd.username")
password = cfg.GetString("storage.kv.etcd.password")
)
cli, err := clientv3.New(clientv3.Config{
Endpoints: endpoints,
Username: username,
Password: password,
DialTimeout: 5 * time.Second,
})
if err != nil {