overflow_discovery/server/rpc_server_handlers.go
crusader bb465d3628 ing
2017-11-15 15:59:43 +09:00

62 lines
1.0 KiB
Go

package server
import (
"io"
"git.loafle.net/commons_go/rpc"
"git.loafle.net/commons_go/rpc/server"
)
func newRPCServerHandler(rpcRegistry rpc.Registry) server.ServerHandler {
sh := &RPCServerHandlers{}
sh.RPCRegistry = rpcRegistry
return sh
}
type RPCServerHandlers struct {
server.ServerHandlers
}
func (sh *RPCServerHandlers) Init() error {
return nil
}
func (sh *RPCServerHandlers) OnStart() {
// no op
}
func (sh *RPCServerHandlers) OnPreRead(r io.Reader) {
// no op
}
func (sh *RPCServerHandlers) OnPostRead(r io.Reader) {
// no op
}
func (sh *RPCServerHandlers) OnPreWriteResult(w io.Writer, result interface{}) {
// no op
}
func (sh *RPCServerHandlers) OnPostWriteResult(w io.Writer, result interface{}) {
// no op
}
func (sh *RPCServerHandlers) OnPreWriteError(w io.Writer, err error) {
// no op
}
func (sh *RPCServerHandlers) OnPostWriteError(w io.Writer, err error) {
// no op
}
func (sh *RPCServerHandlers) OnStop() {
// no op
}
func (sh *RPCServerHandlers) Validate() {
sh.ServerHandlers.Validate()
}