mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
44e312ace9
This commit removes the unused prefix from the etcd backend config as etcd key space separation in LND is implemented by using namespaces instead.
30 lines
756 B
Go
30 lines
756 B
Go
// +build !kvdb_etcd
|
|
|
|
package kvdb
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
)
|
|
|
|
// TestBackend is conditionally set to bdb when the kvdb_etcd build tag is
|
|
// not defined, allowing testing our database code with bolt backend.
|
|
const TestBackend = BoltBackendName
|
|
|
|
var errEtcdNotAvailable = fmt.Errorf("etcd backend not available")
|
|
|
|
// GetEtcdBackend is a stub returning nil and errEtcdNotAvailable error.
|
|
func GetEtcdBackend(ctx context.Context, etcdConfig *EtcdConfig) (
|
|
Backend, error) {
|
|
|
|
return nil, errEtcdNotAvailable
|
|
}
|
|
|
|
// GetTestEtcdBackend is a stub returning nil, an empty closure and an
|
|
// errEtcdNotAvailable error.
|
|
func GetEtcdTestBackend(path string, clientPort, peerPort uint16) (
|
|
Backend, func(), error) {
|
|
|
|
return nil, func() {}, errEtcdNotAvailable
|
|
}
|