getKV

  1. int getKV(const GetKVReq &req, GetKVRsp &rsp)

功能: 根据key获取value和其他信息

参数:

  1. struct GetKVReq
  2. {
  3. 1 require string moduleName; //模块名
  4. 2 require string keyItem; //键
  5. 3 require string idcSpecified = ""; //idc区域
  6. };
  7. struct GetKVRsp
  8. {
  9. 1 require string value; //值
  10. 2 require byte ver; //数据版本号
  11. 3 require int expireTime = 0; //过期时间
  12. };

返回值

返回值 含义
ET_MODULE_NAME_INVALID 模块名错误
ET_KEY_AREA_ERR 当前key不属于本机服务,需要更新路由表重新访问
ET_DB_ERR 数据库读取错误
ET_KEY_INVALID key无效
ET_INPUT_PARAM_ERROR 参数错误,例如key为空
ET_SYS_ERR 系统异常
ET_NO_DATA 数据不存在
ET_SUCC 读取数据成功