diff options
author | Valery Piashchynski <[email protected]> | 2021-09-11 01:04:05 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-11 01:04:05 +0300 |
commit | 0c4dd160a3eec4d76b9b82799c55eea4c5f50629 (patch) | |
tree | abc3eef044d6da54e1ba118637564e4d911e0fa6 /plugins | |
parent | 6984e25ecdfc113400007c45fd69822f09b46ff0 (diff) |
Update .vscode settings
Update codecov
Update configs
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/broadcast/plugin.go | 6 | ||||
-rw-r--r-- | plugins/kv/plugin.go | 7 | ||||
-rw-r--r-- | plugins/memory/memorypubsub/pubsub.go | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/plugins/broadcast/plugin.go b/plugins/broadcast/plugin.go index 47b68fe7..40263eaa 100644 --- a/plugins/broadcast/plugin.go +++ b/plugins/broadcast/plugin.go @@ -53,7 +53,7 @@ func (p *Plugin) Init(cfg config.Configurer, log logger.Logger) error { } func (p *Plugin) Serve() chan error { - return make(chan error) + return make(chan error, 1) } func (p *Plugin) Stop() error { @@ -158,7 +158,7 @@ func (p *Plugin) GetDriver(key string) (pubsub.SubReader, error) { p.publishers[configKey] = ps return ps, nil - default: + case p.cfgPlugin.Has(key): // try global driver section after local ps, err := p.constructors[drStr].PSConstruct(key) if err != nil { @@ -170,6 +170,8 @@ func (p *Plugin) GetDriver(key string) (pubsub.SubReader, error) { p.publishers[configKey] = ps return ps, nil + default: + p.log.Error("can't find local or global configuration, this section will be skipped", "local: ", configKey, "global: ", key) } } } diff --git a/plugins/kv/plugin.go b/plugins/kv/plugin.go index a2b36e3e..86bd982f 100644 --- a/plugins/kv/plugin.go +++ b/plugins/kv/plugin.go @@ -99,7 +99,8 @@ func (p *Plugin) Serve() chan error { // save the storage p.storages[k] = storage - default: + // try global then + case p.cfgPlugin.Has(k): if _, ok := p.constructors[drStr]; !ok { p.log.Warn("no constructors registered", "requested constructor", drStr, "registered", p.constructors) continue @@ -114,9 +115,11 @@ func (p *Plugin) Serve() chan error { // save the storage p.storages[k] = storage + default: + p.log.Error("can't find local or global configuration, this section will be skipped", "local: ", configKey, "global: ", k) + continue } } - continue } diff --git a/plugins/memory/memorypubsub/pubsub.go b/plugins/memory/memorypubsub/pubsub.go index 75122571..231da134 100644 --- a/plugins/memory/memorypubsub/pubsub.go +++ b/plugins/memory/memorypubsub/pubsub.go @@ -21,7 +21,7 @@ type PubSubDriver struct { func NewPubSubDriver(log logger.Logger, _ string) (*PubSubDriver, error) { ps := &PubSubDriver{ - pushCh: make(chan *pubsub.Message, 10), + pushCh: make(chan *pubsub.Message, 100), storage: bst.NewBST(), log: log, } |