overflow_gateway_webapp/servlet/webapp/webapp.go
crusader 01d39c7d64 ing
2017-12-15 18:28:53 +09:00

36 lines
687 B
Go

package webapp
import (
"fmt"
"git.loafle.net/commons_go/logging"
oogwc "git.loafle.net/overflow/overflow_gateway_websocket/config"
oogws "git.loafle.net/overflow/overflow_gateway_websocket/server"
oosc "git.loafle.net/overflow/overflow_server_config"
)
const (
Name = "webapp"
)
var (
cfg *oosc.Servlet
)
func ServletInit(sh oogws.ServerHandler) {
cfg = oogwc.Config.Servlets[Name]
if nil == cfg {
logging.Logger().Panic(fmt.Sprintf("WebApp: config of servlet[%s] is not exist", Name))
}
rpcGH := newGatewayRPCHandler()
rpcSH := sh.RegisterRPCGatewayServlet(Name, rpcGH)
sub := newSubscriberHandler(rpcSH)
sh.RegisterSubscriber(sub)
}
func ServletDestroy() {
}