From 71100e8c7b7c58f58e48bf255ea73df76757dbb7 Mon Sep 17 00:00:00 2001 From: d1slike Date: Tue, 26 Jul 2022 21:34:16 +0300 Subject: [PATCH] MSP-437 drop ws proxy --- conf/config.yml | 4 ---- conf/local.go | 19 ++++++------------- proxy/websocket.go | 20 -------------------- 3 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 proxy/websocket.go diff --git a/conf/config.yml b/conf/config.yml index e82578f..8d9ddbe 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -15,7 +15,3 @@ locations: - pathPrefix: /mdm protocol: http targetModule: mdm-api - - pathPrefix: /ws - protocol: websocket - skipAuth: true - targetModule: admin diff --git a/conf/local.go b/conf/local.go index 8ea591f..3ca105b 100644 --- a/conf/local.go +++ b/conf/local.go @@ -1,24 +1,17 @@ package conf -import ( - "github.com/integration-system/isp-kit/bootstrap" -) - const ( - HttpProtocol = "http" - GrpcProtocol = "grpc" - WebsocketProtocol = "websocket" + HttpProtocol = "http" + GrpcProtocol = "grpc" ) type Local struct { - *bootstrap.LocalConfig Locations []Location } type Location struct { - SkipAuth bool - SkipExistCheck bool - PathPrefix string `valid:"required"` - Protocol string `valid:"required,in(http|grpc|websocket)"` - TargetModule string `valid:"required"` + SkipAuth bool + PathPrefix string `valid:"required"` + Protocol string `valid:"required,in(http|grpc)"` + TargetModule string `valid:"required"` } diff --git a/proxy/websocket.go b/proxy/websocket.go deleted file mode 100644 index 8120d67..0000000 --- a/proxy/websocket.go +++ /dev/null @@ -1,20 +0,0 @@ -package proxy - -import ( - "github.com/integration-system/isp-kit/lb" - "isp-gate-service/middleware" -) - -type Websocket struct { - roundRobin *lb.RoundRobin -} - -func NewWebsocket(hostManager *lb.RoundRobin) (Websocket, error) { - return Websocket{ - roundRobin: hostManager, - }, nil -} - -func (p Websocket) Handle(ctx middleware.Context) error { - return nil -}