diff options
author | Valery Piashchynski <[email protected]> | 2021-05-31 16:05:00 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-05-31 16:05:00 +0300 |
commit | 49703d70a3ede70ce9a0cab824cbcb96dbf824c0 (patch) | |
tree | 181d72a3321d52c960a519ba3a233e3e7fe8e86a /plugins/http/channel.go | |
parent | 0ee91dc24d3e68706d89092c06b1c0d09dab0353 (diff) |
- Rework access_validators
- WS plugin uses it's own pool to handle requests on the /ws (or any
user-defined) endpoint
- Ability to write custom validators
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/http/channel.go')
-rw-r--r-- | plugins/http/channel.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/plugins/http/channel.go b/plugins/http/channel.go deleted file mode 100644 index 23b5ff3e..00000000 --- a/plugins/http/channel.go +++ /dev/null @@ -1,29 +0,0 @@ -package http - -import ( - "net/http" -) - -// messages method used to read messages from the ws plugin with the auth requests for the topics and server -func (p *Plugin) messages() { - for msg := range p.hub.ToWorker() { - p.RLock() - // msg here is the structure with http.ResponseWriter and http.Request - rmsg := msg.(struct { - RW http.ResponseWriter - Req *http.Request - }) - - // invoke handler with redirected responsewriter and request - p.handler.ServeHTTP(rmsg.RW, rmsg.Req) - - p.hub.FromWorker() <- struct { - RW http.ResponseWriter - Req *http.Request - }{ - rmsg.RW, - rmsg.Req, - } - p.RUnlock() - } -} |