gateway_rest/server/server-handler.go

31 lines
585 B
Go
Raw Normal View History

2018-04-06 12:00:01 +00:00
package server
import (
"git.loafle.net/commons/server-go"
cswf "git.loafle.net/commons/server-go/web/fasthttp"
2018-04-06 12:12:53 +00:00
ogeg "git.loafle.net/overflow/gateway/external/grpc"
2018-04-06 12:00:01 +00:00
)
type ServerHandler interface {
cswf.ServerHandler
}
type ServerHandlers struct {
cswf.ServerHandlers
}
2018-04-06 12:12:53 +00:00
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)
}