diff options
author | Valery Piashchynski <[email protected]> | 2021-04-23 00:38:37 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-04-23 00:38:37 +0300 |
commit | 6c55cb6e2d554dfbffe1ce2eedaad3d34202e1bd (patch) | |
tree | ddd08397c74cfc6120e6174864a7a3ef7ca38771 /plugins | |
parent | 06ee748c1ca23bf489ae707041f0e8f3e67fbaf7 (diff) |
- Update arch drawio file
- Update comments
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/kv/doc/kv.drawio | 2 | ||||
-rw-r--r-- | plugins/kv/drivers/redis/driver.go | 1 | ||||
-rw-r--r-- | plugins/kv/storage.go | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/kv/doc/kv.drawio b/plugins/kv/doc/kv.drawio index 9c7456ee..04470e4a 100644 --- a/plugins/kv/doc/kv.drawio +++ b/plugins/kv/doc/kv.drawio @@ -1 +1 @@ -<mxfile host="Electron" modified="2021-04-21T22:20:03.079Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.114 Electron/12.0.4 Safari/537.36" etag="-ll-rpU3Q5Ucu8te95Qq" version="14.5.1" type="device"><diagram id="2us8W0xnLog_cmX3fgYy" name="Page-1">7Vldc6IwFP01PrYDBJQ+KtJ2Z2rb0c5sfUwhC+lG4ob4QX/9Bkn4MNW641rqTJ/MPSQhOefc5Kod4M3WNwzO4xENEelYRrjugGHHssyea4iPHMkkYrhugUQMhxKrgAl+Q6qjRBc4RGmjI6eUcDxvggFNEhTwBgYZo6tmt1+UNN86hxHSgEkAiY7+xCGPC9TuurUHtwhHsXw1AIZc+Qyq3hJIYxjSVQ0Cfgd4jFJetGZrD5GcPkVMMe56x9NyAQwl/JABy2y0Cvh98hqAFz/87S2v8Z+Lrlwbz9SOUSgIkCFlPKYRTSDxK3TA6CIJUT6rIaKqzx2lcwGaAnxFnGdSTbjgVEAxnxH5FK0xf661p/lUl46Mhms58ybIVJBwlj3Xg9qoPKyGbSI1rthfvqmdtEkopQsWoD1cKf9BFiG+p59diivyAtEZEusR4xgikONlcx1Q+jMq+1UKioYU8R8E7Z2LoC0I47QpjHsuwpxRpoE2BTXtNhWtVJzWnnxOqh3BuBz6SLF4s2XIQsFW170sE7rAaE5ROEGO2tKtXMYRUhZvW0KykFuYPD2M+ze+pnBTv1WMOZrM4YaylSiBmlrJWRHjaL2feZ1ROQA4TWZsxcyqqkZMVWHEtUKka+wW4SjbWxpXehokYT+vvUQUEJimONjy8MlPmA9Pjh2s11h13iFVYUfa3extibotVpGGmt21icraUk3kfHLevKP996W277I6wJpXbV5qQMvuwcPd03DQ+kHo2E2rO60fhOrO+jb/Aea3z8H8tmb+H/cXI3/0MJ5+Of+D9v1vaqR8+38XWc45+N/R/C/M7/W9W3/45fzffiF8pbE1fvRa58l1vxpPpl5TjFGEU45YqtElNs6bnECCo0S0A0EAYgLI6cEBJH35YIbDsDhbUIrf4MtmqpzseV72bnbjDDrOMJ9LHCdpcbL8J7p7Vx/T3XuHbetkbOtJfMnYZQYFoVaX5OS+MNGKeElAjf7P/0LbtQ70p30yxlyNsdazePsHkTKrT5DFIqz+hCi+GVZ/5gD/Lw==</diagram></mxfile>
\ No newline at end of file +<mxfile host="Electron" modified="2021-04-22T21:31:28.320Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.128 Electron/12.0.5 Safari/537.36" etag="PMNN2QoTRBeugwC1WCGf" version="14.5.1" type="device"><diagram id="2us8W0xnLog_cmX3fgYy" name="Page-1">7V1Zc6O4Fv41rp55sAsQi3lMHKeTmaQ7lXRmpp9uySDbTLDlBjmJ59dficWAJO8GvLmrYyMkAeccfTqLdGiAzujzawAnw0fsIr+hKe5nA9w0NE1TTI1+sZJZXKJqqhGXDALPTcqyghfvP5QUKknp1HNRWKhIMPaJNykWOng8Rg4plMEgwB/F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LF7iF99r9JMQ//cNtMmEkwcd36fqBCcjQKL8t6sUEkMUkmcUTvA4RBsQv1xVfjn0bkB+4Y3UsqikKiE/2Jz8bBsXZsMlA1ZqkQ4fscsmrO7/AQ==</diagram></mxfile>
\ No newline at end of file diff --git a/plugins/kv/drivers/redis/driver.go b/plugins/kv/drivers/redis/driver.go index 3cc35c13..d0b541b2 100644 --- a/plugins/kv/drivers/redis/driver.go +++ b/plugins/kv/drivers/redis/driver.go @@ -27,6 +27,7 @@ func NewRedisDriver(log logger.Logger, key string, cfgPlugin config.Configurer) log: log, } + // will be different for every connected driver err := cfgPlugin.UnmarshalKey(key, &d.cfg) if err != nil { return nil, errors.E(op, err) diff --git a/plugins/kv/storage.go b/plugins/kv/storage.go index 9f460073..a9530f56 100644 --- a/plugins/kv/storage.go +++ b/plugins/kv/storage.go @@ -60,9 +60,6 @@ func (p *Plugin) Serve() chan error { for the boltdb and memcached We should provide here the actual configs for the all requested storages kv: - default: - driver: memory - boltdb-south: driver: boltdb dir: "tests/rr-bolt" @@ -90,8 +87,10 @@ func (p *Plugin) Serve() chan error { for k, v := range p.cfg.Data { if _, ok := v.(map[string]interface{})[driver]; !ok { errCh <- errors.E(op, errors.Errorf("could not find mandatory driver field in the %s storage", k)) + return errCh } + // config key for the particular sub-driver configKey := fmt.Sprintf("%s.%s", PluginName, k) // at this point we know, that driver field present in the cofiguration switch v.(map[string]interface{})[driver] { @@ -150,7 +149,7 @@ func (p *Plugin) Serve() chan error { p.storages[k] = storage default: - errCh <- errors.E(op, errors.Errorf("unknown storage %s", v.(map[string]interface{})[driver])) + p.log.Error("unknown storage", errors.E(op, errors.Errorf("unknown storage %s", v.(map[string]interface{})[driver]))) } } |