This commit is contained in:
crusader 2017-10-31 19:00:51 +09:00
parent 8e43174376
commit f3709ed461

View File

@ -10,7 +10,7 @@ import (
)
type ServerHandlers struct {
Registry rpc.Registry
RPCRegistry rpc.Registry
codecs map[string]protocol.ServerCodec
}
@ -56,8 +56,8 @@ func (sh *ServerHandlers) OnPostWriteError(w io.Writer, err error) {
}
func (sh *ServerHandlers) Validate() {
if nil == sh.Registry {
panic("Registry(RPCRegistry) must be specified.")
if nil == sh.RPCRegistry {
panic("RPCRegistry must be specified.")
}
}
@ -77,5 +77,5 @@ func (sh *ServerHandlers) getCodec(contentType string) (protocol.ServerCodec, er
}
func (sh *ServerHandlers) invoke(codec protocol.RegistryCodec) (result interface{}, err error) {
return sh.Registry.Invoke(codec)
return sh.RPCRegistry.Invoke(codec)
}