getKV
int getKV(const GetKVReq &req, GetKVRsp &rsp)
功能: 根据key获取value和其他信息
参数:
struct GetKVReq
{
1 require string moduleName; //模块名
2 require string keyItem; //键
3 require string idcSpecified = ""; //idc区域
};
struct GetKVRsp
{
1 require string value; //值
2 require byte ver; //数据版本号
3 require int expireTime = 0; //过期时间
};
返回值:
返回值 | 含义 |
---|---|
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 | 读取数据成功 |