From d5810751987c884cf9887aedd33aac0c1e51a6d4 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 15 Dec 2017 18:20:41 +0900 Subject: [PATCH] ing --- build/docker/config/config.json | 20 +++++++++++++++---- servlet/{noauth/noauth.go => auth/auth.go} | 4 ++-- .../{noauth => auth}/gateway_rpc_handlers.go | 2 +- .../{noauth => auth}/subscriber_handlers.go | 4 +--- servlet/servlet.go | 15 ++++++-------- 5 files changed, 26 insertions(+), 19 deletions(-) rename servlet/{noauth/noauth.go => auth/auth.go} (95%) rename servlet/{noauth => auth}/gateway_rpc_handlers.go (99%) rename servlet/{noauth => auth}/subscriber_handlers.go (98%) diff --git a/build/docker/config/config.json b/build/docker/config/config.json index f42f8ee..023d4ab 100644 --- a/build/docker/config/config.json +++ b/build/docker/config/config.json @@ -38,8 +38,8 @@ } }, "servlets": { - "web": { - "entry": "/web", + "auth": { + "entry": "/auth", "socket": { "maxMessageSize": 8192, "writeTimeout": 0, @@ -50,8 +50,20 @@ "binaryMessage": false } }, - "file": { - "entry": "/file", + "probe": { + "entry": "/probe", + "socket": { + "maxMessageSize": 8192, + "writeTimeout": 0, + "readTimeout": 0, + "pongTimeout": 60, + "pingTimeout": 10, + "pingPeriod": 10, + "binaryMessage": false + } + }, + "data": { + "entry": "/data", "socket": { "maxMessageSize": 8192, "writeTimeout": 0, diff --git a/servlet/noauth/noauth.go b/servlet/auth/auth.go similarity index 95% rename from servlet/noauth/noauth.go rename to servlet/auth/auth.go index 43511ea..5e1ea77 100644 --- a/servlet/noauth/noauth.go +++ b/servlet/auth/auth.go @@ -1,4 +1,4 @@ -package noauth +package auth import ( "fmt" @@ -10,7 +10,7 @@ import ( ) const ( - Name = "noauth" + Name = "auth" ) var ( diff --git a/servlet/noauth/gateway_rpc_handlers.go b/servlet/auth/gateway_rpc_handlers.go similarity index 99% rename from servlet/noauth/gateway_rpc_handlers.go rename to servlet/auth/gateway_rpc_handlers.go index 3dd8869..3b7214f 100644 --- a/servlet/noauth/gateway_rpc_handlers.go +++ b/servlet/auth/gateway_rpc_handlers.go @@ -1,4 +1,4 @@ -package noauth +package auth import ( "context" diff --git a/servlet/noauth/subscriber_handlers.go b/servlet/auth/subscriber_handlers.go similarity index 98% rename from servlet/noauth/subscriber_handlers.go rename to servlet/auth/subscriber_handlers.go index 5d803f8..140bd57 100644 --- a/servlet/noauth/subscriber_handlers.go +++ b/servlet/auth/subscriber_handlers.go @@ -1,4 +1,4 @@ -package noauth +package auth import ( "git.loafle.net/commons_go/websocket_fasthttp/websocket" @@ -30,5 +30,3 @@ func (sh *SubscriberHandlers) OnSubscribe(channel string, message oos.SubscribeM func (sh *SubscriberHandlers) Validate() { sh.SubscriberHandlers.Validate() } - - diff --git a/servlet/servlet.go b/servlet/servlet.go index 9288c87..ae9f241 100644 --- a/servlet/servlet.go +++ b/servlet/servlet.go @@ -1,21 +1,18 @@ package servlet - import ( - oogws "git.loafle.net/overflow/overflow_gateway_websocket/server" + "git.loafle.net/overflow/overflow_gateway_probe/servlet/auth" "git.loafle.net/overflow/overflow_gateway_probe/servlet/data" - "git.loafle.net/overflow/overflow_gateway_probe/servlet/noauth" "git.loafle.net/overflow/overflow_gateway_probe/servlet/probe" + oogws "git.loafle.net/overflow/overflow_gateway_websocket/server" ) - -func ServletInit(sh oogws.ServerHandler) { - data.ServletInit(sh) - noauth.ServletInit(sh) +func ServletInit(sh oogws.ServerHandler) { + auth.ServletInit(sh) probe.ServletInit(sh) + data.ServletInit(sh) } - -func ServletDestroy() { +func ServletDestroy() { }