Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change JSON stream to always report data events instead of progress, follow strict stream semantics, support backpressure and improve error handling #50

Merged
merged 2 commits into from
Sep 18, 2019

Conversation

clue
Copy link
Owner

@clue clue commented Sep 18, 2019

// old: all JSON streams use custom "progress" event
$stream = $client->eventsStream();
$stream->on('progress', function ($data) {
    var_dump($data);
});

// new: all streams use default "data" event
$stream = $client->eventsStream();
$stream->on('data', function ($data) {
    var_dump($data);
});

// new: stream follows stream semantics and supports stream composition
$stream = $client->eventsStream();
$stream->pipe($logger);

@clue clue added this to the v0.3.0 milestone Sep 18, 2019
@clue clue merged commit f4a28bf into clue:master Sep 18, 2019
@clue clue deleted the stream-semantics branch September 18, 2019 08:04
@clue clue modified the milestones: v0.3.0, v1.0.0 Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant