Rename store Namespace / Prefix options to Database and Table (#1492)

* Rename Namespace to DB, Rename Prefix to table, Remove Suffix Option

* Rename options

* Rename options

* Add store_table option

* Table per service, not Database per service
This commit is contained in:
Jake Sanders
2020-04-06 16:45:55 +01:00
committed by GitHub
parent 3a378eb7d6
commit 3324d140c0
14 changed files with 69 additions and 95 deletions

View File

@@ -60,11 +60,11 @@ func (e *etcdStore) init() error {
}
e.client = client
ns := ""
if len(e.options.Prefix) > 0 {
ns = e.options.Prefix
if len(e.options.Table) > 0 {
ns = e.options.Table
}
if len(e.options.Namespace) > 0 {
ns = e.options.Namespace + "/" + ns
if len(e.options.Database) > 0 {
ns = e.options.Database + "/" + ns
}
if len(ns) > 0 {
e.client.KV = namespace.NewKV(e.client.KV, ns)