feat: Add abort() to WriteChannel interface #9101
Labels
api: storage
Issues related to the Cloud Storage API.
priority: p4
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
This is a proposal to add a new method
abort()
to thecom.google.cloud.WriteChannel
interface (and probably tocom.google.cloud.ReadChannel
)Justification:
WriteChannel
implies scenarios when sent data are buffered and flushed only when theclose()
method is called. If something unplanned happens in the middle, this interface doesn't allow it to close the channel without flushing the collected data. Look at the example:abort()
would handle this case elegantly.The request for
abort()
came from the Storage to support the aborting of resumable upload.Storage-202,
Storage-1232
Perhaps, other components need this functionality as well.
Please consider including
abort()
in theWriteChannel
interface.The text was updated successfully, but these errors were encountered: