gateway_rest/server/server-handler.go
crusader 06ea44929a ing
2018-04-10 13:03:46 +09:00

31 lines
585 B
Go

package server
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 {
cswf.ServerHandler
}
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) Destroy(serverCtx server.ServerCtx) {
ogeg.DestroyPackage()
sh.ServerHandlers.Destroy(serverCtx)
}