container_discovery/servlet/discovery-servlet.go
crusader c40d8eb004 ing
2018-04-19 20:36:56 +09:00

56 lines
1.1 KiB
Go

package servlet
import (
"net"
"git.loafle.net/commons/server-go"
css "git.loafle.net/commons/server-go/socket"
ocs "git.loafle.net/overflow/container-go/servlet"
)
type DiscoveryServlet interface {
ocs.RPCServlet
}
type DiscoveryServlets struct {
ocs.RPCServlets
}
func (s *DiscoveryServlets) Init(serverCtx server.ServerCtx) error {
if err := s.RPCServlets.Init(serverCtx); nil != err {
return err
}
return nil
}
func (s *DiscoveryServlets) OnStart(serverCtx server.ServerCtx) error {
if err := s.RPCServlets.OnStart(serverCtx); nil != err {
return err
}
return nil
}
func (s *DiscoveryServlets) OnStop(serverCtx server.ServerCtx) {
s.RPCServlets.OnStop(serverCtx)
}
func (s *DiscoveryServlets) Destroy(serverCtx server.ServerCtx) {
s.RPCServlets.Destroy(serverCtx)
}
func (s *DiscoveryServlets) Handshake(servletCtx server.ServletCtx, conn net.Conn) error {
return nil
}
func (s *DiscoveryServlets) OnConnect(servletCtx server.ServletCtx, conn css.Conn) {
s.RPCServlets.OnConnect(servletCtx, conn)
}
func (s *DiscoveryServlets) OnDisconnect(servletCtx server.ServletCtx) {
s.RPCServlets.OnDisconnect(servletCtx)
}