blob: 26cf87e8710727d6043127a9b7d6e056172831de (
plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#ifndef __DORIS_CLIENT_PRODUCE_H__
#define __DORIS_CLIENT_PRODUCE_H__
#include <openssl/md5.h>
#include <MESA/field_stat2.h>
#include "doris_producer_client.h"
#include "doris_client_http.h"
struct doris_prod_param
{
u_int32_t upload_frag_size;
u_int32_t client_sync_on;
struct doris_http_parameter *param;
struct event_base *manage_evbase;
screen_stat_handle_t fsstat_handle;
struct event fs_timer_output;
char fsstat_dst_ip[64];
char fsstat_appname[16];
char fsstat_filepath[256];
u_int32_t fsstat_period;
int32_t fsstat_print_mode;
int32_t fsstat_dst_port;
int32_t fsstat_field[FSSTAT_DORIS_PRD_FILED_NUM];
int32_t fsstat_status[FSSTAT_DORIS_PRD_STATUS_NUM];
};
struct doris_prod_instance
{
struct doris_prod_param *param;
struct doris_http_instance *http_instance;
struct event_base *worker_evbase;
struct event timer_statistic;
struct doris_prod_statistics statistic, statistic_last;
void *runtime_log;
};
struct doris_upload_ctx
{
struct doris_http_ctx *httpctx;
char token[64];
char business[32];
char filename[256];
struct easy_string estr;
int32_t cfg_type;
size_t req_offset;
int64_t res_version;
void *userdata;
void (*verstart_cb)(enum PROD_VERSTART_RES result, const char *body, void *userdata);
void (*upfrag_cb)(enum PROD_VEROP_RES result, void *userdata);
void (*verend_cb)(enum PROD_VEROP_RES result, int64_t version, void *userdata);
void (*vercancel_cb)(enum PROD_VEROP_RES result, void *userdata);
struct doris_prod_instance *instance;
};
#endif
|