Created
October 23, 2020 22:21
-
-
Save NonLogicalDev/4292fae83460d96067a32e4a65cf6247 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const m = Machine({ | |
| key: 'agent-probe', | |
| initial: 'connecting', | |
| states: { | |
| connecting: { | |
| on: { | |
| "GRPC_CONNECTED": 'connected', | |
| "GRPC_DISCONNECTED": 'connecting', | |
| "CTX_DONE": 'shutdown', | |
| } | |
| }, | |
| connected: { | |
| on: { | |
| "GRPC_DISCONNECTED": 'connecting', | |
| "ASSIGNMENT_MISMATCH": 'assignment_mismatch', | |
| "CTX_DONE": 'shutdown', | |
| }, | |
| }, | |
| assignment_mismatch: { | |
| on: { | |
| "GRPC_DISCONNECTED": 'connecting', | |
| "REFRESH_SEND_ERROR": 'assignment_mismatch', | |
| "REFRESH_SEND_SUCCESS": 'connected', | |
| "CTX_DONE": 'shutdown', | |
| } | |
| }, | |
| shutdown: { | |
| type: "final" | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment