rpc/server/server_handlers.go
crusader b284554280 ing
2017-11-08 15:35:27 +09:00

24 lines
463 B
Go

package server
import (
"git.loafle.net/commons_go/rpc"
"git.loafle.net/commons_go/rpc/protocol"
)
type ServerHandlers struct {
rpc.ServerHandlers
RPCRegistry rpc.Registry
}
func (sh *ServerHandlers) Invoke(codec protocol.RegistryCodec) (result interface{}, err error) {
return sh.RPCRegistry.Invoke(codec)
}
func (sh *ServerHandlers) Validate() {
sh.ServerHandlers.Validate()
if nil == sh.RPCRegistry {
panic("RPCRegistry must be specified.")
}
}