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
I'm in need of a ProxyReadSeeker to wrap ReadSeekers (like files) for use with the AWS go SDK. stuff like s3.PutObject() says it takes an io.Reader, but really requires an io.ReadSeeker since it reads the data once to calculate checksums and then again to send it to S3.
I'm envisioning that the progress bar goes backwards when it seeks back, and then moves forwards again, basically tracking the current read position as it goes. Hopefully shouldn't be too hard to implement. I'm willing to take a stab at it, if you agree to the general design.
The text was updated successfully, but these errors were encountered:
the other option I'm thinking about is extending ProxyReader to just handle Seek calls like it handles Close calls, but always return an error if you call Seek() on something that isn't a Seeker underneath. this would mean less code, both in the implementation and in the io_test.go. feedback appreciated!
We can't just add Seek to the reader. Some packages can take io.Reader in arguments, but inside do a type check for io.Seeker - in this case, we can mess up the logic.
ProxyReaderSeeker is a solution, but with Seek, it is impossible to correctly calculate the progress (speed, remaining time, etc.) I think it's ok and users will keep this in mind.
I'm in need of a ProxyReadSeeker to wrap ReadSeekers (like files) for use with the AWS go SDK. stuff like s3.PutObject() says it takes an io.Reader, but really requires an io.ReadSeeker since it reads the data once to calculate checksums and then again to send it to S3.
I'm envisioning that the progress bar goes backwards when it seeks back, and then moves forwards again, basically tracking the current read position as it goes. Hopefully shouldn't be too hard to implement. I'm willing to take a stab at it, if you agree to the general design.
The text was updated successfully, but these errors were encountered: