Close #99 增加全局传输限速功能,增加passthrough状态下eventcb的错误日志

* 增加全局传输限速功能,可以限制上游、下游的传输速度;
* 增加eventcb中的错误日志,当BEV_EVENT_ERROR发生时,打印错误代码与日志信息。
This commit is contained in:
luqiuwen
2018-12-08 20:48:19 +06:00
parent 0b76bdf5e5
commit de92efb380
6 changed files with 109 additions and 13 deletions

View File

@@ -46,6 +46,14 @@ struct tfe_proxy_tcp_options
int tcp_ttl_downstream;
};
struct tfe_proxy_rate_limit_options
{
unsigned int read_rate;
unsigned int read_burst;
unsigned int write_rate;
unsigned int write_burst;
};
struct tfe_proxy_accept_para
{
/* Both upstream and downstream FDs */
@@ -73,6 +81,9 @@ struct tfe_proxy
unsigned int nr_work_threads;
struct tfe_thread_ctx * work_threads[TFE_THREAD_MAX];
/* buffer options */
unsigned int buffer_output_limit;
unsigned int nr_modules;
struct tfe_plugin * modules;
@@ -84,6 +95,10 @@ struct tfe_proxy
unsigned int tcp_all_passthrough;
struct tfe_proxy_tcp_options tcp_options;
/* GLOBAL RATELIMIT */
unsigned int en_rate_limit;
struct tfe_proxy_rate_limit_options rate_limit_options;
/* PERFOMANCE MONIOTR VARIABLES*/
long long stat_val[TFE_STAT_MAX];
int fs_id[TFE_STAT_MAX];