View Source cowmachine_decision_core (cowmachine v1.10.3)

HTTP decision core for cowmachine

Link to this section Summary

Functions

Handle Cowmachine state request.
Cowmachine response.

Link to this section Types

-type cmstate() ::
    #cmstate{controller :: atom(),
             is_process_called :: boolean(),
             cache :: map(),
             options :: map()}.

Link to this section Functions

Link to this function

handle_request(CmState, Context)

View Source
-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().
Handle Cowmachine state request.
Link to this function

respond(Code, State, Context)

View Source
-spec respond(Code, State, Context) -> Result
           when
               Code :: integer(),
               State :: cmstate(),
               Context :: cowmachine_req:context(),
               Result :: {term(), #cmstate{}, term()}.
Cowmachine response.