62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
|
|
#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
|
||
|
|
|