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
Params for firehose.PutRecordBatchInput and firehose.PutRecordInput currently require a struct of type firehose.Record.
It would be great if was defined with an interface Record with Data field. This way any struct that meets this contract (i.e. kinesis.Record) could also be used (instead of having to copy data into firehose.Record structs)
Thoughts?
// The unit of data in a delivery stream.typeRecordstruct {
_struct{} `type:"structure"`// The data blob, which is base64-encoded when the blob is serialized. The maximum// size of the data blob, before base64-encoding, is 1,000 KB.Data []byte`type:"blob" required:"true"`
}
That sounds like a great idea to me, too. Data could be replaced that way and the firehose.PutXX functions could pass in a pre-allocated buffer to a method Data(w io.Writer) which can be re-used.
Hello @harlow and @nightlyone, thank you for suggesting this! I am tagging this as a feature request. We are more than happy to look at PRs. Unfortunately, we cannot mutate the Record object directly, as this would be a breaking change. However, We can add another layer on top of the service api. This layer would have some sort of interface. We can then call an interface method to adapt the interface to the Record object. If you have any further questions, let us know.
jasdel
changed the title
Consider using interface for Firehose Record
service/firehose: Consider using interface for Firehose Record
Apr 12, 2017
Going to close this feature request as this change would require a breaking change to the SDK to change the Record type to an interface. In addition this would prevent the SDK being forward compatible with the service if the service were to add additional optional fields to the Record type as the interface would not be able to represent them.
This logic could better exist as a higher level abstraction on top of the Kinesis service.
Params for
firehose.PutRecordBatchInput
andfirehose.PutRecordInput
currently require a struct of typefirehose.Record
.It would be great if was defined with an interface
Record
withData
field. This way any struct that meets this contract (i.e.kinesis.Record
) could also be used (instead of having to copy data into firehose.Record structs)Thoughts?
aws-sdk-go/service/firehose/api.go
Lines 838 to 845 in cb8f6e2
The text was updated successfully, but these errors were encountered: