应用平台 APPSTAGE-SLB实例配置:自定义lua配置

时间:2024-07-24 14:36:06

自定义lua配置

表14 customLuaConf字段说明

参数名

是否必选

说明

slb100GlobalInit

大小不得超过16KB

slb200WorkerInit

大小不得超过16KB

slb300PreFlowControl

大小不得超过16KB

slb400OnFlowControled

大小不得超过16KB

slb500PreGrey

大小不得超过16KB

slb600PostGrey

大小不得超过16KB

slb700PostRoute

大小不得超过16KB

slb750RespHeaderFilter

大小不得超过16KB

slb800RespBodyFilter

大小不得超过16KB

slb_instance_config/SLB_100_Global_Init_iac3.lua #SLB_100_Global_Init_iac3.lua默认配置

--the custom point SLB_100_Global_Init, running when Global init.
--will be triggered in exec function, so pls make sure there is a exec function in global_init
local global_init = {};
function global_init.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"i am in global_init")
end
return global_init

slb_instance_config/SLB_200_Worker_Init_iac3.lua #SLB_200_Worker_Init_iac3.lua默认配置

--the custom point SLB_200_Worker_Init, running when Worker init.
--will be triggered in exec function, so pls make sure there is a exec function in worker_init
local worker_init = {};
function worker_init.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"i am in worker init");
end
return worker_init

slb_instance_config/SLB_300_Pre_FlowControl_iac3.lua #SLB_300_Pre_FlowControl_iac3.lua默认配置

--the custom point SLB_300_Pre_FlowControl, running before flowcontrol and blacklist.
--will be triggered in exec function, so pls make sure there is a exec function in pre_flowcontrol
local pre_flowcontrol = {};
function pre_flowcontrol.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I am in pre flowcontrol")
end
return pre_flowcontrol

slb_instance_config/SLB_400_On_FlowControled_iac3.lua #SLB_400_On_FlowControled_iac3.lua默认配置

--the custom point SLB_400_On_FlowControlled, running when request is flowcontrolled or blocked due to blacklist.
--will be triggered in exec function, so pls make sure there is a exec function in on_flowcontroled
local on_flowcontroled = {};
function on_flowcontroled.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"the flowcontrol type is:",gen_param.control_type)
end
return on_flowcontroled

slb_instance_config/SLB_500_Pre_Grey_iac3.lua #SLB_500_Pre_Grey_iac3.lua默认配置

--the custom point SLB_500_Pre_Grey, running before Greyrule judge.
--will be triggered in exec function, so pls make sure there is a exec function in pre_grey
local pre_grey = {};
function pre_grey.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I am in pre grey");
end
return pre_grey

slb_instance_config/SLB_600_Post_Grey_iac3.lua #SLB_600_Post_Grey_iac3.lua默认配置

--the custom point SLB_600_Post_Grey, running after get result of greyrule.
--will be triggered in exec function, so pls make sure there is a exec function in post_grey
local post_grey = {};
function post_grey.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I AM IN POST GREY");
end
return post_grey

slb_instance_config/SLB_700_Post_Route_iac3.lua #SLB_700_Post_Route_iac3.lua默认配置

--the custom point SLB_700_Post_Route, running after get result of routerule.
--will be triggered in exec function, so pls make sure there is a exec function in post_route
local post_route = {};
function post_route.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I AM IN POST Route");
end
return post_route

slb_instance_config/SLB_750_Resp_Header_Filter_iac3.lua #SLB_750_Resp_Header_Filter_iac3.lua默认配置

--the custom point SLB_750_Resp_Header_Filter, running during header filter.
--will be triggered in exec function, so pls make sure there is a exec function in header_filter
local header_filter = {};
function header_filter.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I am in header filter");
end
return header_filter

slb_instance_config/SLB_800_Resp_Body_Filter_iac3.lua #SLB_800_Resp_Body_Filter_iac3.lua默认配置

--the custom point SLB_800_Resp_Body_Filter, running during body filter.
--will be triggered in exec function, so pls make sure there is a exec function in body_filter
local body_filter = {};
function body_filter.exec(gen_param)
    --eg:ngx.log(ngx.ERR,"I am in body filter");
end
return body_filter
support.huaweicloud.com/devg-appstage/appstage_06_0088.html