code.go 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package mhayaCode
  2. const (
  3. OK int32 = 0 // is ok
  4. SessionUIDNotBind int32 = 10 // session uid not bind
  5. DiscoveryNotFoundNode int32 = 11 // discovery not fond node id
  6. NodeRequestError int32 = 12 // node request error
  7. RPCNetError int32 = 20 // rpc net error
  8. RPCUnmarshalError int32 = 21 // rpc data unmarshal error
  9. RPCMarshalError int32 = 22 // rpc data marshal error
  10. RPCRemoteExecuteError int32 = 23 // rpc remote method executor error
  11. ActorPathIsNil int32 = 24 // actor target path is nil
  12. ActorFuncNameError int32 = 25 // actor function name is error
  13. ActorConvertPathError int32 = 26 // convert to path error
  14. ActorMarshalError int32 = 27 // marshal arg error
  15. ActorUnmarshalError int32 = 28 // unmarshal arg error
  16. ActorCallFail int32 = 29 // actor call fail
  17. ActorSourceEqualTarget int32 = 30 // source equal target
  18. ActorPublishRemoteError int32 = 31 // actor publish remote error
  19. ActorChildIDNotFound int32 = 32 // actor child id not found
  20. )
  21. func IsOK(code int32) bool {
  22. return code == OK
  23. }
  24. func IsFail(code int32) bool {
  25. return code != OK
  26. }