2018-09-18 11:14:11 +08:00
|
|
|
#ifndef __TANGO_CACHE_UPLOAD_H__
|
|
|
|
|
#define __TANGO_CACHE_UPLOAD_H__
|
|
|
|
|
|
|
|
|
|
#include <sys/queue.h>
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
|
|
#include "tango_cache_client_in.h"
|
|
|
|
|
|
2018-10-23 20:26:06 +08:00
|
|
|
bool check_expires_fresh_header(struct tango_cache_ctx *ctx);
|
|
|
|
|
bool fetch_header_over_biz(struct tango_cache_ctx *ctx);
|
|
|
|
|
|
2018-09-27 15:04:56 +08:00
|
|
|
void tango_cache_curl_put_done(struct tango_cache_ctx *ctx, CURLcode res, long res_code);
|
|
|
|
|
void tango_cache_curl_get_done(struct tango_cache_ctx *ctx, CURLcode res, long res_code);
|
|
|
|
|
void tango_cache_curl_del_done(struct tango_cache_ctx *ctx, CURLcode res, long res_code);
|
2018-10-11 16:35:13 +08:00
|
|
|
void tango_cache_curl_muldel_done(struct tango_cache_ctx *ctx, CURLcode res, long res_code);
|
2018-09-18 11:14:11 +08:00
|
|
|
|
2018-10-27 11:03:58 +08:00
|
|
|
int cache_delete_minio_object(struct tango_cache_ctx *ctx, bool call_back=false);
|
2018-12-14 15:07:09 +08:00
|
|
|
int do_tango_cache_multi_delete(struct tango_cache_ctx *ctx, bool callback=false);
|
2018-10-11 16:35:13 +08:00
|
|
|
|
2018-11-23 20:55:28 +08:00
|
|
|
bool cache_cancel_upload_minio(struct tango_cache_ctx *ctx);
|
2018-09-21 14:50:41 +08:00
|
|
|
bool cache_kick_upload_minio_multipart(struct tango_cache_ctx *ctx, size_t block_len);
|
2018-12-14 15:07:09 +08:00
|
|
|
int do_tango_cache_update_end(struct tango_cache_ctx *ctx, bool callback);
|
2018-09-21 14:50:41 +08:00
|
|
|
|
2018-12-14 15:07:09 +08:00
|
|
|
int do_tango_cache_upload_once_data(struct tango_cache_ctx *ctx, enum PUT_MEMORY_COPY_WAY way, const char *data, size_t size, bool call_back=false);
|
|
|
|
|
int do_tango_cache_upload_once_evbuf(struct tango_cache_ctx *ctx, enum EVBUFFER_COPY_WAY way, struct evbuffer *evbuf, bool call_back=false);
|
2018-09-18 11:14:11 +08:00
|
|
|
|
2018-12-14 15:07:09 +08:00
|
|
|
int do_tango_cache_head_object(struct tango_cache_ctx *ctx, enum OBJECT_LOCATION where_to_head);
|
|
|
|
|
int do_tango_cache_fetch_object(struct tango_cache_ctx *ctx, enum OBJECT_LOCATION where_to_get);
|
2018-09-18 11:14:11 +08:00
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|