-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add support for decoding event streams #566
Conversation
Codecov Report
@@ Coverage Diff @@
## 7.x.x #566 +/- ##
==========================================
- Coverage 78.87% 78.72% -0.16%
==========================================
Files 71 73 +2
Lines 6292 6487 +195
==========================================
+ Hits 4963 5107 +144
- Misses 1329 1380 +51
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits about access control and doc comments but take or leave them
public struct EventDecodingContainer { | ||
let payload: ByteBuffer | ||
|
||
public func decodePayload() -> ByteBuffer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit - this has no DocC comments
public init() {} | ||
|
||
public func decode<T: Decodable>(_ type: T.Type, from buffer: inout ByteBuffer) throws -> T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to be public if the type isn't?
* Add EventStream type * Split event stream code into two files * If response is chunked assume it is raw * Fix test errors * Fix a couple strict concurrency issues I missed * Add tests for EventStreams * Changes from PR review
* Add EventStream type * Split event stream code into two files * If response is chunked assume it is raw * Fix test errors * Fix a couple strict concurrency issues I missed * Add tests for EventStreams * Changes from PR review
* Add EventStream type * Split event stream code into two files * If response is chunked assume it is raw * Fix test errors * Fix a couple strict concurrency issues I missed * Add tests for EventStreams * Changes from PR review
* Add EventStream type * Split event stream code into two files * If response is chunked assume it is raw * Fix test errors * Fix a couple strict concurrency issues I missed * Add tests for EventStreams * Changes from PR review
* Add EventStream type * Split event stream code into two files * If response is chunked assume it is raw * Fix test errors * Fix a couple strict concurrency issues I missed * Add tests for EventStreams * Changes from PR review
See S3.SelectObjectContent, Lambda.InvokeWithResponseStream etc. You can see documentation on decoding these here https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html.
AWSEventStream
type that reads from a base ByteBuffer async sequence.Related PRs: soto-project/soto-codegenerator#74, soto-project/soto#686