View Source cowmachine_decision_core (cowmachine v1.12.1)
Link to this section Summary
Link to this section Types
-type cmstate() ::
#cmstate{controller :: atom(),
is_process_called :: boolean(),
cache :: map(),
options :: map()}.
Link to this section Functions
-spec handle_request(CmState, Context) -> Result when CmState :: cmstate(), Context :: cowmachine_req:context(), Result :: {atom(), StateResult, Context} | {upgrade, UpgradeFun, StateResult, Context}, StateResult :: CmState, UpgradeFun :: atom().
-spec respond(Code, State, Context) -> Result when Code :: integer(), State :: cmstate(), Context :: cowmachine_req:context(), Result :: {term(), #cmstate{}, term()}.