forked from alibaba/nginx-tfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathngx_http_tfs_duplicate.h
40 lines (28 loc) · 1.35 KB
/
ngx_http_tfs_duplicate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (C) 2010-2012 Alibaba Group Holding Limited
*/
#ifndef _NGX_HTTP_TFS_DUPLICATE_H_INCLUDED_
#define _NGX_HTTP_TFS_DUPLICATE_H_INCLUDED_
#include <ngx_tfs_common.h>
#include <ngx_http_tfs_tair_helper.h>
typedef struct {
u_char tair_key[NGX_HTTP_TFS_DUPLICATE_KEY_SIZE];
int32_t dup_version;
int32_t file_ref_count;
ngx_str_t dup_file_name;
ngx_str_t dup_file_suffix;
ngx_buf_t save_body_buffer;
ngx_http_tfs_t *data;
ngx_http_tfs_tair_instance_t *tair_instance;
unsigned md5_sumed:1;
} ngx_http_tfs_dedup_ctx_t;
ngx_int_t ngx_http_tfs_get_duplicate_info(ngx_http_tfs_dedup_ctx_t *ctx,
ngx_pool_t *pool, ngx_log_t *log, ngx_chain_t *data);
ngx_int_t ngx_http_tfs_set_duplicate_info(ngx_http_tfs_dedup_ctx_t *ctx,
ngx_pool_t *pool, ngx_log_t *log, ngx_chain_t *data);
ngx_int_t ngx_http_tfs_delete_duplicate_info(ngx_http_tfs_dedup_ctx_t *ctx,
ngx_pool_t *pool, ngx_log_t *log, ngx_chain_t *data);
ngx_int_t ngx_http_tfs_get_dedup_instance(ngx_http_tfs_dedup_ctx_t *ctx,
ngx_http_tfs_tair_server_addr_info_t *server_addr_info,
uint32_t server_addr_hash);
#endif /* _NGX_HTTP_TFS_DUPLICATE_H_INCLUDED_ */