ReplayCursor
Can be used to iterate a given replay state.
This object is typically created via cursor.
Note that this object holds state outside of the replay state itself, namely the current position of the cursor.
Methods
perform
Performs an action at the current position of the replay cursor, records its result in the replay state, and advances the cursor.
Note that if the cursor has not reached the end of the replay state yet, the action will be replayed from the log.
op
op(payload: string): number;
Begins a new op at the current position of the replay cursor, and advances the cursor.
Note that if the cursor has not reached the end of the replay state yet, the op will be taken from the log.
done
Completes a given op with the result obtained from a callback function, and advances the cursor.
Note that if the cursor has not reached the end of the replay state yet, the callback function will not be invoked. Instead, the result will be replayed from the log.
checkpoint
checkpoint(): Checkpoint;
Creates a checkpoint at the current state of the cursor