🐞 fix(TSG-7599): hos client 初始化失败,定期尝试重连hos服务

This commit is contained in:
pengxuanzheng
2021-09-27 18:49:27 +08:00
parent 7b6a1281cf
commit 8c49f4d2c2
5 changed files with 182 additions and 150 deletions

View File

@@ -6,13 +6,8 @@
#ifndef __HOS_CLIENT_INIT__
#define __HOS_CLIENT_INIT__
/*hos instance */
typedef struct hos_instance_s{
bool result;
int error_code;
char error_message[1024];
const char *hos_url_prefix;
}* hos_instance;
struct hos_instance_s;
typedef struct hos_instance_s *hos_instance;
#define HOS_CLIENT_OK 0
@@ -33,6 +28,7 @@ enum hoserrors
HOS_CONF_ERROR = -7,
HOS_BUCKET_NOT_EXIST = -8,
HOS_INSTANCE_NOT_INIT = -9,
HOS_INSTANCE_NOT_ENABLE = -10,
};
@@ -97,6 +93,9 @@ hos_instance hos_init_instance(const char *conf_path, const char *module, size_t
* 返回值: hos_instance 成功result 为true
*************************************************************************************/
hos_instance hos_get_instance();
int hos_get_init_instance_errorcode();
const char *hos_get_init_instance_errormsg();
const char *hos_get_upload_endpoint();
/*************************************************************************************
* 函数名: hos_upload_file
* 参数: hos_instance instance 非空句柄