summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-18 12:38:36 +0300
committerValery Piashchynski <[email protected]>2021-06-18 12:38:36 +0300
commit1229d24e574f9632ea68dea721fe7ed437afbb85 (patch)
tree334eb3c4a02d8ec559af42850fab2fb45325ddf7 /plugins
parent9e8bad3988c1fec2e545898d529446f7b93e537b (diff)
- Add broadcast tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/broadcast/doc/broadcast_arch.drawio2
-rw-r--r--plugins/broadcast/plugin.go4
-rw-r--r--plugins/websockets/executor/executor.go25
-rw-r--r--plugins/websockets/plugin.go2
4 files changed, 17 insertions, 16 deletions
diff --git a/plugins/broadcast/doc/broadcast_arch.drawio b/plugins/broadcast/doc/broadcast_arch.drawio
index b2ee091a..fd5ff1f9 100644
--- a/plugins/broadcast/doc/broadcast_arch.drawio
+++ b/plugins/broadcast/doc/broadcast_arch.drawio
@@ -1 +1 @@
-<mxfile host="Electron" modified="2021-06-17T18:52:07.846Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.6.13 Chrome/89.0.4389.128 Electron/12.0.9 Safari/537.36" etag="eUG-4GjLSDkFvWQsKkB7" version="14.6.13" type="device"><diagram id="xG4Au6HO45p6fae_AhkE" name="Page-1">7V1rc5u4Gv41nml3xhkkcf0YO222M5vTnHg7bT+dwUa22WLLCziX/fVHAoFBkmMcrsmmlwSEJOC9v48ujNB083gdurv1DfFwMIKa9zhCVyMIoWZC+ouVPKUlCAIjLVmFvpeWgUPBzP8H80KNl+59D0elijEhQezvyoULst3iRVwqc8OQPJSrLUlQvuvOXWGpYLZwA7n0u+/F6+zFNO1w4Xfsr9axeGXjZrV5QbR2PfJQKEKfRmgaEhKnR5vHKQ4Y+TLCpO0+H7maP1mIt3GVBlPdNL9Mrrdj6wcaz7b36x/kemzqaTf3brDnr8yfNn7KaBCS/dbDr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Z57yIF9cauW1ogDvtScVcQUmvg2iZLK8g4F/NskUXo3Su0Z99rDDZxqMUUHIlMUYa0SIG/NlslhbZEJ2oIl5douj6W8zAHJmf/cjTCLhxOHROOrQztWmo5j7nOPlWwdXJnHfFRj+ByW1E61uZUyc3kBUkpPQ8I26TmA3tT4rG+Ih1mN/wM=</diagram></mxfile> \ No newline at end of file
+<mxfile host="Electron" modified="2021-06-18T09:34:25.915Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.6.13 Chrome/89.0.4389.128 Electron/12.0.9 Safari/537.36" etag="THNfOcV33EQGG0gzo1UK" version="14.6.13" type="device"><diagram id="xG4Au6HO45p6fae_AhkE" name="Page-1">7V1bc6M4Fv41rk1vVVIg7o+Jk8l01fR2Np7e7n7a4iLbbDB4AMdJ//qVQGCQZBsHEMSTviRGIAznfj4dSRNlunq5j+318kvkwWACJO9lotxOALBkE/3EDa95AzAVJW9ZxL6Xt8m7hpn/C5JGibRufA8mtQvTKApSf11vdKMwhG5aa7PjONrWL5tHQf1b1/YCMg0z1w7Y1u++ly7Ja0iStDvxO/QXy5Q+s7KLq0lDsrS9aFtpUu4myjSOojT/tHqZwgBTryBM3u+3PWfLJ4thmDbpMFV1/fPNfXhp/FAuZ+Hz8kd0f6mr+W2e7WBDXpk8bfpa0CCONqEH8V2kiXKzXfopnK1tF5/dIq6jtmW6CtCRjD7O/SCYRkEUZ30Vz4bm3EXtSRpHT7ByRndN6MzRGfY9yKs9wziFL5Um8l73MFrBNH5Fl5CzikloTMRM1cjxtsazvG1ZZZdFGm0iJ4vy3jtKog+EmCcQVtP7Jexcw3+5hM3+4B5RmFba8z/dEFyW5DrFDYOluGpyKK7oWl8U186b4qBO8ctSoAckec/WY2iSU0KuSNrQFLcY+kIPOSxyGMXpMlpEoR3c7Vpv6hzYXfNHFK0J3f8H0/SVeF97k0Z1rsAXP/2Bu19p5OgnuRn+fPtSPXgtDkL0upVO+PBncT98sOuWHRX99v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gn0IXnV7dSpOkq7w8VdJNC7+uSNyMHUCa3T3+544ThIX+biPRfPNQHAqgmMpd4vYYcirnkjV0/bmfeRV/52v6KGwVEq0xqa7atFqji8Epfqo78GzCt/gMqtD11F2WBUNejTGvLuzFyXuGGSplTo7sAWape0CBxh10st5ovxAZZxUyKk2ULrBN8lHc+SszMHY2JJvg1TWh94m1YLOyuv4Cvtg4p/xErdjcxh4dWSKiqci2Mk/0yLms6iwSB4rlYrteIoLPx/e4rrHRBpBvXHPUjXUCY7ZOLL5ebJu+19rQ4dHJHQz5cIdyT6I9HXqyZywk3dPeW43lr5WpKXeO3PkRkXN++DRmK0Hu8wnDq9qO93MMWpFQdIXfqZh3ddAbnAWspZu0M+dVc/Pgxt5grWIPwyreuITuU4Uv58kKpmTCZJ21JZITgI25fuKVyHHZ72f8EHamTOnST6rMmWbPh/M/KTvxinzWZAc/niXvaKejS5xAS6gaAd6CCekmxvEuqUvMx03KAm4cLa+L9awvYuhl3CNpes5iEiWfJQ8NqmpbNjgrKyhCa+SKTcRqQy+VgRYphDCH6HN9w5rnQNfeJFj5thnoH4X/wMHOUxhtJyyUb6el5yOADsqXFvCKzZZKedn62YM7uI/9bPtBxjxSTOnkcE42PJQ9mPNafsFd6G0yqxCFQRY0zvMqzOoXZxxLEuhdNVnY7xzFkAlfAWtJVN440xsGIdBhHOGdfXaRLYoml18iD+Ir/g8=</diagram></mxfile> \ No newline at end of file
diff --git a/plugins/broadcast/plugin.go b/plugins/broadcast/plugin.go
index 612b6a47..3b420a4b 100644
--- a/plugins/broadcast/plugin.go
+++ b/plugins/broadcast/plugin.go
@@ -74,8 +74,8 @@ func (p *Plugin) Serve() chan error {
return errCh
}
default:
- p.log.Warn("wrong type detected in the configuration, please, check yaml indentation")
- continue
+ errCh <- errors.E(op, errors.Str("wrong type detected in the configuration, please, check yaml indentation"))
+ return errCh
}
// config key for the particular sub-driver kv.memcached
diff --git a/plugins/websockets/executor/executor.go b/plugins/websockets/executor/executor.go
index 0583be0c..664b4dfd 100644
--- a/plugins/websockets/executor/executor.go
+++ b/plugins/websockets/executor/executor.go
@@ -22,6 +22,7 @@ type Response struct {
type Executor struct {
sync.Mutex
+ // raw ws connection
conn *connection.Connection
log logger.Logger
@@ -67,20 +68,20 @@ func (e *Executor) StartCommandLoop() error { //nolint:gocognit
err = json.Unmarshal(data, msg)
if err != nil {
- e.log.Error("error unmarshal message", "error", err)
+ e.log.Error("unmarshal message", "error", err)
continue
}
// nil message, continue
if msg == nil {
- e.log.Warn("get nil message, skipping")
+ e.log.Warn("nil message, skipping")
continue
}
switch msg.Command {
// handle leave
case commands.Join:
- e.log.Debug("get join command", "msg", msg)
+ e.log.Debug("received join command", "msg", msg)
val, err := e.accessValidator(e.req, msg.Topics...)
if err != nil {
@@ -95,13 +96,13 @@ func (e *Executor) StartCommandLoop() error { //nolint:gocognit
packet, errJ := json.Marshal(resp)
if errJ != nil {
- e.log.Error("error marshal the body", "error", errJ)
+ e.log.Error("marshal the body", "error", errJ)
return errors.E(op, fmt.Errorf("%v,%v", err, errJ))
}
errW := e.conn.Write(packet)
if errW != nil {
- e.log.Error("error writing payload to the connection", "payload", packet, "error", errW)
+ e.log.Error("write payload to the connection", "payload", packet, "error", errW)
return errors.E(op, fmt.Errorf("%v,%v", err, errW))
}
@@ -115,13 +116,13 @@ func (e *Executor) StartCommandLoop() error { //nolint:gocognit
packet, err := json.Marshal(resp)
if err != nil {
- e.log.Error("error marshal the body", "error", err)
+ e.log.Error("marshal the body", "error", err)
return errors.E(op, err)
}
err = e.conn.Write(packet)
if err != nil {
- e.log.Error("error writing payload to the connection", "payload", packet, "error", err)
+ e.log.Error("write payload to the connection", "payload", packet, "error", err)
return errors.E(op, err)
}
@@ -133,7 +134,7 @@ func (e *Executor) StartCommandLoop() error { //nolint:gocognit
// handle leave
case commands.Leave:
- e.log.Debug("get leave command", "msg", msg)
+ e.log.Debug("received leave command", "msg", msg)
// prepare response
resp := &Response{
@@ -143,13 +144,13 @@ func (e *Executor) StartCommandLoop() error { //nolint:gocognit
packet, err := json.Marshal(resp)
if err != nil {
- e.log.Error("error marshal the body", "error", err)
+ e.log.Error("marshal the body", "error", err)
return errors.E(op, err)
}
err = e.conn.Write(packet)
if err != nil {
- e.log.Error("error writing payload to the connection", "payload", packet, "error", err)
+ e.log.Error("write payload to the connection", "payload", packet, "error", err)
return errors.E(op, err)
}
@@ -170,7 +171,7 @@ func (e *Executor) Set(topics []string) error {
// associate connection with topics
err := e.sub.Subscribe(e.connID, topics...)
if err != nil {
- e.log.Error("error subscribing to the provided topics", "topics", topics, "error", err.Error())
+ e.log.Error("subscribe to the provided topics", "topics", topics, "error", err.Error())
// in case of error, unsubscribe connection from the dead topics
_ = e.sub.Unsubscribe(e.connID, topics...)
return err
@@ -188,7 +189,7 @@ func (e *Executor) Leave(topics []string) error {
// remove associated connections from the storage
err := e.sub.Unsubscribe(e.connID, topics...)
if err != nil {
- e.log.Error("error subscribing to the provided topics", "topics", topics, "error", err.Error())
+ e.log.Error("subscribe to the provided topics", "topics", topics, "error", err.Error())
return err
}
diff --git a/plugins/websockets/plugin.go b/plugins/websockets/plugin.go
index f0b7c6c3..ca5f2f59 100644
--- a/plugins/websockets/plugin.go
+++ b/plugins/websockets/plugin.go
@@ -123,7 +123,7 @@ func (p *Plugin) Serve() chan error {
p.workersPool = pool.NewWorkersPool(p.subReader, &p.connections, p.log)
- // run all pubsubs drivers
+ // we need here only Reader part of the interface
go func(ps pubsub.Reader) {
for {
select {