Created
August 25, 2021 11:44
-
-
Save rajivr/90a9290ea523c8cf6be41a9da10a73bb to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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 iteratorMachine = Machine({ | |
id: 'IteratorMachine', | |
initial: 'fetching', | |
context: { | |
global_immutable: { | |
transaction: '', | |
_marker: '', | |
snapshot: '', | |
options_mode: '', | |
options_reverse: '', | |
}, | |
global_mutable: { | |
iteration: '', | |
options_limit: '', | |
begin: '', | |
end: '', | |
}, | |
local: { | |
fetching: { | |
immutable: { | |
fut_key_value_array: '', | |
}, | |
}, | |
kv_array_available: { | |
immutable: { | |
more: '', | |
}, | |
mutable: { | |
kvs: '', | |
} | |
} | |
}, | |
}, | |
states: { | |
fetching: { | |
on: { | |
FETCH_OK: 'kv_array_available', | |
FETCH_ERROR: 'error', | |
} | |
}, | |
kv_array_available: { | |
on: { | |
FETCH_NEXT_BATCH: 'fetching', | |
DONE: 'done', | |
} | |
}, | |
error: { | |
type: 'final' | |
}, | |
done: { | |
type: 'final' | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment