You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments