-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This updates the high-level event stream interfaces and creates AWS implementations of them. The `EventStream` protocol was split into three protocols: `DuplexEventStream`, `InputEventStream`, and `OutputEventStream`. These three classes encompass the three different configurations that clients can expect, and each are typed with their particular use-case in mind. This lets the type declarations be more concise and accurate. Before, it could be extremely ambiguous from a typing perspective what you were getting. The old `InputEventStream` and `OutputEventStream` classes were renamed to `AsyncEventPublisher` and `AsyncEventReceiver`, respectively. This is a more accurate description of what they do, particularly as they can be used for a service implementation as well. In the AWS implementation, some changes needed to be made. Notably the `Event` class had to get a `decode_async` method to be able to read from an async stream. Then the calling of that method had to be pulled out of the deserializer so that both sync and async clients can use it. Test cases were updated to also test the async method. Tests for the event stream classes will come in the form of protocol tests later on.
- Loading branch information
1 parent
fda945a
commit 7cec4ee
Showing
11 changed files
with
569 additions
and
54 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.