2021-08-23 10:35:48 +02:00
|
|
|
//go:build !kvdb_etcd
|
2020-05-15 16:59:37 +02:00
|
|
|
// +build !kvdb_etcd
|
|
|
|
|
|
|
|
package kvdb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2021-02-09 20:19:31 +01:00
|
|
|
|
2021-04-26 19:08:11 +02:00
|
|
|
"github.com/lightningnetwork/lnd/kvdb/etcd"
|
2020-05-15 16:59:37 +02:00
|
|
|
)
|
|
|
|
|
2022-12-14 09:07:14 +01:00
|
|
|
// EtcdBackend is conditionally set to false when the kvdb_etcd build tag is not
|
|
|
|
// defined. This will allow testing of other database backends.
|
|
|
|
const EtcdBackend = false
|
2020-05-15 16:59:37 +02:00
|
|
|
|
|
|
|
var errEtcdNotAvailable = fmt.Errorf("etcd backend not available")
|
|
|
|
|
2021-02-09 17:44:43 +01:00
|
|
|
// StartEtcdTestBackend is a stub returning nil, and errEtcdNotAvailable error.
|
2021-09-08 15:10:11 +02:00
|
|
|
func StartEtcdTestBackend(path string, clientPort, peerPort uint16,
|
|
|
|
logFile string) (*etcd.Config, func(), error) {
|
2021-01-06 19:40:30 +01:00
|
|
|
|
2020-05-15 16:59:37 +02:00
|
|
|
return nil, func() {}, errEtcdNotAvailable
|
|
|
|
}
|