mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-28 07:44:20 +01:00
* api-spec: move the api-spec to root and init go.mod * go mod tidy * move buf files in the root as well * gh action for api-spec changes only * gh action for api-spec on push and pr * introduce go.work and remove all replaces * solve dependencies and force btcd/btcec@v2.3.3 * go work sync * force btcd/btcec@v2.3.3 * go mod tidy
23 lines
597 B
Go
23 lines
597 B
Go
//go:build kvdb_etcd
|
|
// +build kvdb_etcd
|
|
|
|
package kvdb
|
|
|
|
import (
|
|
"github.com/ark-network/ark/server/pkg/kvdb/etcd"
|
|
)
|
|
|
|
// EtcdBackend is conditionally set to etcd when the kvdb_etcd build tag is
|
|
// defined, allowing testing our database code with etcd backend.
|
|
const EtcdBackend = true
|
|
|
|
// GetEtcdTestBackend creates an embedded etcd backend for testing
|
|
// storig the database at the passed path.
|
|
func StartEtcdTestBackend(path string, clientPort, peerPort uint16,
|
|
logFile string) (*etcd.Config, func(), error) {
|
|
|
|
return etcd.NewEmbeddedEtcdInstance(
|
|
path, clientPort, peerPort, logFile,
|
|
)
|
|
}
|