Documentation ¶
Index ¶
- Variables
- type RpcError
- func NewMethodExecError(service, method string) *RpcError
- func NewProxyDisconnected(uuid uint64, id uint32, name string) *RpcError
- func NewProxyNotExit(proxyid uint32) *RpcError
- func NewProxyNotFound(callid uint32) *RpcError
- func NewRpcError(code RpcErrorCode, format string, args ...interface{}) *RpcError
- func NewServiceNotExist(uuid uint64) *RpcError
- type RpcErrorCode
- type RpcPanicInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRpcNotFound = gerror.New("rpc service or method not found") ErrRpcTimeOut = gerror.New("rpc proxy call time out") ErrRpcRet = gerror.New("rpc method execute return error") ErrRpcNotInit = gerror.New("rpc framework not init") ErrRpcCallFinished = gerror.New("rpc call has been finished") ErrRpcClosed = gerror.New("rpc has been closed") ErrInvalidProto = gerror.New("invalid rpc protocol") ErrServiceInit = gerror.New("initialize service error") ErrInvalidSubCtx = gerror.New("invalid subscribe params") ErrRepeatedSub = gerror.New("repeated subscribe for service ") ErrServiceNotFound = gerror.New("service not founded") ErrInvalidPublisher = gerror.New("invalid publisher") )
View Source
var ( ErrTransClose = &RpcError{TransportClosed, "Transport has been closed"} ErrProxyInvalid = &RpcError{ProxyNotExist, "Proxy Is Invalid"} ErrStubCallInvalid = &RpcError{StubCallInvalid, "stub's call invalid"} ErrServicePanic = &RpcError{ServicePanic, "service exec panic"} ErrIllegalReq = &RpcError{errCode: CommErr, errStr: "invalid request message!"} ErrIllegalProto = &RpcError{errCode: CommErr, errStr: "rpc protocol message buffer error !"} ErrMsgNotRegistered = &RpcError{errCode: CommErr, errStr: "rpc message not registered !"} )
Functions ¶
This section is empty.
Types ¶
type RpcError ¶
type RpcError struct {
// contains filtered or unexported fields
}
func NewMethodExecError ¶
func NewProxyDisconnected ¶
func NewProxyNotExit ¶
func NewProxyNotFound ¶
func NewRpcError ¶
func NewRpcError(code RpcErrorCode, format string, args ...interface{}) *RpcError
func NewServiceNotExist ¶
func (*RpcError) Code ¶
func (re *RpcError) Code() RpcErrorCode
type RpcErrorCode ¶
type RpcErrorCode uint32
const ( RpcNoErr RpcErrorCode = iota CommErr TransportClosed ProxyNotExist ProxyDisconnected ProxyTimeout ProxyCallNoFound StubCallInvalid ServiceShutdown ServiceNotExist ServiceHasExist MethodException ServicePanic SERVICE_NOT_FOUND FUNCTION_NOT_FOUND )
type RpcPanicInfo ¶ added in v0.4.16
type RpcPanicInfo struct { Info interface{} Pkg []byte }
func (RpcPanicInfo) String ¶ added in v0.4.16
func (info RpcPanicInfo) String() string
Click to show internal directories.
Click to hide internal directories.