增加集群版redis作为元信息和对象缓存,去除Minio事件通知的redis元信息获取方式。
This commit is contained in:
52
cache/include/object_store_client.h
vendored
Normal file
52
cache/include/object_store_client.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef __OBJECT_STORE_CLIENT_H__
|
||||
#define __OBJECT_STORE_CLIENT_H__
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event.h>
|
||||
|
||||
#include "cache_evbase_client.h"
|
||||
|
||||
struct object_store_instance
|
||||
{
|
||||
struct cache_evbase_instance **instances;
|
||||
u_int32_t instance_num;
|
||||
};
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD>API<50>̰߳<DFB3>ȫ<EFBFBD><C8AB>API<50><49>ʹ<EFBFBD><CAB9>˵<EFBFBD><CBB5><EFBFBD>ο<EFBFBD>tango_cache_client.h*/
|
||||
|
||||
enum CACHE_ERR_CODE object_store_get_last_error(const struct cache_evbase_ctx *ctx_asyn);
|
||||
void object_store_get_statistics(const struct object_store_instance *instance, struct cache_statistics *out);
|
||||
|
||||
void object_store_global_init(void);
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>̰߳<DFB3>ȫ<EFBFBD><C8AB><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>߳<EFBFBD>*/
|
||||
struct object_store_instance *object_store_instance_new(const char* profile_path, const char* section, int thread_num, void *runtimelog);
|
||||
|
||||
|
||||
//GET<45>ӿڣ<D3BF><DAA3>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>ʧ<EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD>-1<><31>future<72>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>ִ<EFBFBD>У<EFBFBD><D0A3><EFBFBD>ͬ
|
||||
int object_store_fetch_object(struct object_store_instance *instance, struct future* f, struct tango_cache_meta_get *meta, enum OBJECT_LOCATION where_to_get);
|
||||
int object_store_head_object(struct object_store_instance *instance, struct future* f, struct tango_cache_meta_get *meta);
|
||||
struct tango_cache_result *object_store_read_result(void *promise_result);
|
||||
|
||||
//DELETE<54>ӿ<EFBFBD>
|
||||
int object_store_delete_object(struct object_store_instance *instance, struct future* f, const char *objkey);
|
||||
|
||||
//һ<><D2BB><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ӿ<EFBFBD>
|
||||
int object_store_upload_once_data(struct object_store_instance *instance, struct future* f,
|
||||
enum PUT_MEMORY_COPY_WAY way, const char *data, size_t size,
|
||||
struct tango_cache_meta_put *meta,
|
||||
char *path/*OUT*/, size_t pathsize);
|
||||
int object_store_upload_once_evbuf(struct object_store_instance *instance, struct future* f,
|
||||
struct evbuffer *evbuf,
|
||||
struct tango_cache_meta_put *meta,
|
||||
char *path/*OUT*/, size_t pathsize);
|
||||
|
||||
//<2F><>ʽ<EFBFBD>ϴ<EFBFBD><CFB4>ӿ<EFBFBD>
|
||||
struct cache_evbase_ctx *object_store_update_start(struct object_store_instance *instance, struct future* f, struct tango_cache_meta_put *meta);
|
||||
int object_store_update_frag_data(struct cache_evbase_ctx *ctx_asyn, enum PUT_MEMORY_COPY_WAY way, const char *data, size_t size);
|
||||
int object_store_update_frag_evbuf(struct cache_evbase_ctx *ctx_asyn, struct evbuffer *evbuf);
|
||||
int object_store_update_end(struct cache_evbase_ctx *ctx_asyn, char *path/*OUT*/, size_t pathsize);
|
||||
void object_store_update_cancel(struct cache_evbase_ctx *ctx_asyn);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user