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() }