From f40ae6579b1d0f55cbfc2a152e2ba373a34c79e4 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 6 Apr 2018 21:12:53 +0900 Subject: [PATCH] ing --- glide.yaml | 1 + server/server-handler.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/glide.yaml b/glide.yaml index 31733d8..73c6ed6 100644 --- a/glide.yaml +++ b/glide.yaml @@ -2,3 +2,4 @@ package: git.loafle.net/overflow/gateway_rest import: - package: github.com/valyala/fasthttp version: ^20160617.0.0 +- package: git.loafle.net/overflow/gateway diff --git a/server/server-handler.go b/server/server-handler.go index 1a27e65..292421d 100644 --- a/server/server-handler.go +++ b/server/server-handler.go @@ -5,6 +5,7 @@ import ( "git.loafle.net/commons/server-go" cswf "git.loafle.net/commons/server-go/web/fasthttp" + ogeg "git.loafle.net/overflow/gateway/external/grpc" ) type ServerHandler interface { @@ -15,6 +16,15 @@ type ServerHandlers struct { cswf.ServerHandlers } +func (sh *ServerHandlers) Init(serverCtx server.ServerCtx) error { + if err := sh.ServerHandlers.Init(serverCtx); nil != err { + return nil + } + ogeg.InitPackage() + + return nil +} + func (sh *ServerHandlers) Listener(serverCtx server.ServerCtx) (net.Listener, error) { l, err := net.Listen("tcp", "192.168.1.101:44449") if nil != err { @@ -23,3 +33,9 @@ func (sh *ServerHandlers) Listener(serverCtx server.ServerCtx) (net.Listener, er return l, nil } + +func (sh *ServerHandlers) Destroy(serverCtx server.ServerCtx) { + ogeg.DestroyPackage() + + sh.ServerHandlers.Destroy(serverCtx) +}