etcd: implement temporary db support

- temporary db support is implemented with a unique key prefix
- prevent closing etcd connection when closing temporary db
This commit is contained in:
André Roth
2024-07-27 17:55:00 +02:00
parent 640c202ee5
commit 9768ecef22
2 changed files with 48 additions and 6 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ func NewDB(url string) (database.Storage, error) {
if err != nil {
return nil, err
}
return &EtcDStorage{url, cli}, nil
return &EtcDStorage{url, cli, ""}, nil
}
func NewOpenDB(url string) (database.Storage, error) {