整理目录结构,编写CMakeLists.txt文件

This commit is contained in:
Lu
2018-08-17 20:29:38 +08:00
parent 093afcce8d
commit 86c18a15c3
68 changed files with 13 additions and 11566 deletions

30
cache/include/tango_cache_client.h vendored Normal file
View File

@@ -0,0 +1,30 @@
#include "future.h"
struct tango_cache_instance{};
struct tango_cache_update_ctx{};
#define CACHE_FRAG_BEGIN 0x01
#define CACHE_FRAG_DATA 0x02
#define CACHE_FRAG_END 0x04
#define CACHE_FRAG_FULL (CACHE_FRAG_BEGIN|CACHE_FRAG_DATA|CACHE_FRAG_END)
struct tango_cache_result
{
char frag_type;
unsigned char* data_frag;
size_t size;
};
struct tango_cache_meta
{
const char* url;
const char* content_type;
};
struct tango_cache_instance* tango_cache_init(event_base* evbase,const char* profile_path, const char* section);
int tango_cache_fetch(struct tango_cache_instance* instance,struct future* future, const char* http_hdr, const char* url);
//following tfe_stream_write_xx functions are NOT thread safe, MUST be called in the stream process thread.
struct tango_cache_update_ctx* tango_cache_update_start(struct tango_cache_instance* instance,struct future* future, const char* http_hdr, const char* url);
/*
@return 0 if successful, or -1 if an error occurred
*/
int tango_cache_update_frag(struct tango_cache_update_ctx* ctx,const unsigned char *data, size_t size);
void tango_cache_update_end(struct tango_cache_update_ctx*ctx);