Skip to content

Commit 652f5d8

Browse files
author
Zhen Li
committed
Refactoring the stream observer to use a state machine
to describe the inner state changes. This stream observer is used as reactive run and pull handler, async run and pull handler, as well as other message handlers. For reactive run and pull handler, the start state is `READY` state where a run message is sent and we will auto write a pull message once the run message reply is received. For async run and pull handler, the start state is `READY_STREAMING` where a run and a pull message are sent and we will auto write a pull message once apull message reply is received with has_more flag. For other single message handlers, the start state is `STREAMING` where we will wait for a success reply and save all meta received.
1 parent 486d4ec commit 652f5d8

File tree

1 file changed

+215
-157
lines changed

1 file changed

+215
-157
lines changed

0 commit comments

Comments
 (0)