@@ -65,7 +65,8 @@ local schema = {
6565 type = " integer" ,
6666 minimum = 3 ,
6767 default = 300 ,
68- description = " Circuit breaker duration in seconds (applies to both count and ratio policies)"
68+ description = " Circuit breaker duration in seconds " ..
69+ " (applies to both count and ratio policies)"
6970 },
7071 policy = {
7172 type = " string" ,
@@ -164,7 +165,8 @@ local schema = {
164165 type = " integer" ,
165166 minimum = 1 ,
166167 default = 10 ,
167- description = " Minimum number of calls before circuit breaker can be triggered"
168+ description = " Minimum number of calls before " ..
169+ " circuit breaker can be triggered"
168170 },
169171 sliding_window_size = {
170172 type = " integer" ,
@@ -178,7 +180,8 @@ local schema = {
178180 minimum = 1 ,
179181 maximum = 20 ,
180182 default = 3 ,
181- description = " Number of permitted calls when circuit breaker is half-open"
183+ description = " Number of permitted calls when " ..
184+ " circuit breaker is half-open"
182185 }
183186 },
184187 default = {
@@ -208,7 +211,8 @@ local schema = {
208211 minimum = 0 ,
209212 maximum = 1 ,
210213 default = 0.6 ,
211- description = " Success rate threshold to close circuit breaker from half-open state"
214+ description = " Success rate threshold to close circuit breaker " ..
215+ " from half-open state"
212216 }
213217 },
214218 default = { http_statuses = { 200 }, success_ratio = 0.6 }
@@ -635,8 +639,8 @@ local function ratio_based_log(conf, ctx)
635639 if success_rate >= success_ratio then
636640 -- Transition back to CLOSED state
637641 set_circuit_breaker_state (ctx , CLOSED )
638- core .log .info (" Circuit breaker transitioned from HALF_OPEN to CLOSED - success rate: " ,
639- success_rate , " >= threshold: " , success_ratio )
642+ core .log .info (" Circuit breaker transitioned from HALF_OPEN to CLOSED - " ..
643+ " success rate: " , success_rate , " >= threshold: " , success_ratio )
640644
641645 -- Clean up all counters for fresh start
642646 shared_buffer :delete (gen_half_open_calls_key (ctx ))
0 commit comments