mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 08:55:59 +01:00
Allow multiple etcd hosts to be specified in db.etcd.host.
This commit is contained in:
parent
72a36da9c6
commit
3d48dbdd55
2 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -138,7 +139,7 @@ func NewEtcdClient(ctx context.Context, cfg Config) (*clientv3.Client,
|
|||
context.Context, func(), error) {
|
||||
|
||||
clientCfg := clientv3.Config{
|
||||
Endpoints: []string{cfg.Host},
|
||||
Endpoints: strings.Split(cfg.Host, ","),
|
||||
DialTimeout: etcdConnectionTimeout,
|
||||
Username: cfg.User,
|
||||
Password: cfg.Pass,
|
||||
|
|
|
@ -5,6 +5,7 @@ package etcd
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -49,7 +50,7 @@ func NewEtcdTestFixture(t *testing.T) *EtcdTestFixture {
|
|||
t.Cleanup(etcdCleanup)
|
||||
|
||||
cli, err := clientv3.New(clientv3.Config{
|
||||
Endpoints: []string{config.Host},
|
||||
Endpoints: strings.Split(config.Host, ","),
|
||||
Username: config.User,
|
||||
Password: config.Pass,
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue