HaoTien commented on code in PR #12765:
URL: https://github.com/apache/apisix/pull/12765#discussion_r2735219728


##########
apisix/plugins/api-breaker.lua:
##########
@@ -133,13 +263,70 @@ local _M = {
     schema = schema,
 }
 
-
 function _M.check_schema(conf)
     return core.schema.check(schema, conf)
 end
 
+-- Circuit breaker state management functions
+local function get_circuit_breaker_state(ctx)
+  local state_key = gen_state_key(ctx)
+  local state, err = shared_buffer:get(state_key)
+  if err then
+    core.log.warn("failed to get circuit breaker state: ", err)
+    return CLOSED
+  end
+  return state or CLOSED
+end

Review Comment:
   Hi,@Baoyuantop ,I have rechecked the code to avoid unnecessary format 
modifications
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to