mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 11:32:46 +02:00
Merge pull request #8845 from bitbandi/multiple-etcd-host
Allow multiple etcd host
This commit is contained in:
@@ -87,6 +87,9 @@ commitment when the channel was force closed.
|
|||||||
* Commitment fees are now taken into account when [calculating the fee
|
* Commitment fees are now taken into account when [calculating the fee
|
||||||
exposure threshold](https://github.com/lightningnetwork/lnd/pull/8824).
|
exposure threshold](https://github.com/lightningnetwork/lnd/pull/8824).
|
||||||
|
|
||||||
|
* [Allow](https://github.com/lightningnetwork/lnd/pull/8845) multiple etcd hosts
|
||||||
|
to be specified in db.etcd.host.
|
||||||
|
|
||||||
## RPC Updates
|
## RPC Updates
|
||||||
|
|
||||||
* [`xImportMissionControl`](https://github.com/lightningnetwork/lnd/pull/8779)
|
* [`xImportMissionControl`](https://github.com/lightningnetwork/lnd/pull/8779)
|
||||||
|
@@ -14,7 +14,7 @@ type Config struct {
|
|||||||
|
|
||||||
EmbeddedLogFile string `long:"embedded_log_file" description:"Optional log file to use for embedded instance logs. note: use for testing only."`
|
EmbeddedLogFile string `long:"embedded_log_file" description:"Optional log file to use for embedded instance logs. note: use for testing only."`
|
||||||
|
|
||||||
Host string `long:"host" description:"Etcd database host."`
|
Host string `long:"host" description:"Etcd database host. Supports multiple hosts separated by a comma."`
|
||||||
|
|
||||||
User string `long:"user" description:"Etcd database user."`
|
User string `long:"user" description:"Etcd database user."`
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -138,7 +139,7 @@ func NewEtcdClient(ctx context.Context, cfg Config) (*clientv3.Client,
|
|||||||
context.Context, func(), error) {
|
context.Context, func(), error) {
|
||||||
|
|
||||||
clientCfg := clientv3.Config{
|
clientCfg := clientv3.Config{
|
||||||
Endpoints: []string{cfg.Host},
|
Endpoints: strings.Split(cfg.Host, ","),
|
||||||
DialTimeout: etcdConnectionTimeout,
|
DialTimeout: etcdConnectionTimeout,
|
||||||
Username: cfg.User,
|
Username: cfg.User,
|
||||||
Password: cfg.Pass,
|
Password: cfg.Pass,
|
||||||
|
@@ -5,6 +5,7 @@ package etcd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ func NewEtcdTestFixture(t *testing.T) *EtcdTestFixture {
|
|||||||
t.Cleanup(etcdCleanup)
|
t.Cleanup(etcdCleanup)
|
||||||
|
|
||||||
cli, err := clientv3.New(clientv3.Config{
|
cli, err := clientv3.New(clientv3.Config{
|
||||||
Endpoints: []string{config.Host},
|
Endpoints: strings.Split(config.Host, ","),
|
||||||
Username: config.User,
|
Username: config.User,
|
||||||
Password: config.Pass,
|
Password: config.Pass,
|
||||||
})
|
})
|
||||||
|
@@ -1374,7 +1374,7 @@
|
|||||||
|
|
||||||
[etcd]
|
[etcd]
|
||||||
|
|
||||||
; Etcd database host.
|
; Etcd database host. Supports multiple hosts separated by a comma.
|
||||||
; Default:
|
; Default:
|
||||||
; db.etcd.host=
|
; db.etcd.host=
|
||||||
; Example:
|
; Example:
|
||||||
|
Reference in New Issue
Block a user