diff options
author | Valery Piashchynski <[email protected]> | 2021-07-14 19:11:29 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-14 19:11:29 +0300 |
commit | 3ce3b5a6e0839e31d2cfb3d3b6fa7f9c6ca2e0af (patch) | |
tree | 0f975f62cc60b8ab75c92691f08270242c36f311 /plugins/websockets | |
parent | cd07985494b3ebb03fd6553bed9aa1393052ffc5 (diff) | |
parent | 67db4b5f7b66e9a32713133baed83c3ab7146bb8 (diff) |
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
# Conflicts:
# pkg/worker_watcher/interface.go
Diffstat (limited to 'plugins/websockets')
-rw-r--r-- | plugins/websockets/plugin.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/websockets/plugin.go b/plugins/websockets/plugin.go index 4420916c..6c119e57 100644 --- a/plugins/websockets/plugin.go +++ b/plugins/websockets/plugin.go @@ -28,6 +28,9 @@ import ( const ( PluginName string = "websockets" + + RrMode string = "RR_MODE" + RrBroadcastPath string = "RR_BROADCAST_PATH" ) type Plugin struct { @@ -113,7 +116,7 @@ func (p *Plugin) Serve() chan error { AllocateTimeout: p.cfg.Pool.AllocateTimeout, DestroyTimeout: p.cfg.Pool.DestroyTimeout, Supervisor: p.cfg.Pool.Supervisor, - }, map[string]string{"RR_MODE": "http"}) + }, map[string]string{RrMode: "http", RrBroadcastPath: p.cfg.Path}) if err != nil { errCh <- err } @@ -176,7 +179,7 @@ func (p *Plugin) Middleware(next http.Handler) http.Handler { val, err := p.accessValidator(r) p.RUnlock() if err != nil { - p.log.Error("validation error") + p.log.Error("access validation") w.WriteHeader(400) return } @@ -280,7 +283,7 @@ func (p *Plugin) Reset() error { AllocateTimeout: p.cfg.Pool.AllocateTimeout, DestroyTimeout: p.cfg.Pool.DestroyTimeout, Supervisor: p.cfg.Pool.Supervisor, - }, map[string]string{"RR_MODE": "http"}) + }, map[string]string{RrMode: "http", RrBroadcastPath: p.cfg.Path}) if err != nil { return errors.E(op, err) } |