Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
926 B
926 B
| sidebar_position |
|---|
| 6 |
Handlers
For a message to reach a keeper, it has to go through a message server handler. A handler is where you can apply logic to allow or deny a message to succeed.
- If you're familiar with the Model-view-controller (MVC) software architecture, the keeper is a bit like the model, and the handler is a bit like the controller.
- If you're familiar with React or Vue architecture, the keeper is a bit like the reducer store and the handler is a bit like actions.
Three message types were automatically added to the message server:
MsgSubmitScavengeMsgCommitSolutionMsgRevealSolution
Each message, when handled, calls the appropriate keeper method that is responsible for committing changes to the store.