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
Currently, flow.Sink is just an io.WriteCloser which is convenient but not ideal for a lot of use cases because the Close method doesn't accept a context.Context.
Most sinks (GCS and S3Compat come to mind) write their contents when they are closed but we have no way of signaling/canceling these operations.
Do we want to:
Make our own interface that accepts a context on close?
Redesign the sinks to not write their data on close?
Something else I haven't thought of?
The text was updated successfully, but these errors were encountered:
andrewhare
changed the title
Rethink flow.Sink interface
Redesign flow.Sink interface
Nov 30, 2020
Another option that occured to me is to store the context that we pass in when we create the sink and use it in the Close method when its called. This doesn't feel like a great solution but it works for now.
Currently,
flow.Sink
is just anio.WriteCloser
which is convenient but not ideal for a lot of use cases because theClose
method doesn't accept acontext.Context
.Most sinks (GCS and S3Compat come to mind) write their contents when they are closed but we have no way of signaling/canceling these operations.
Do we want to:
The text was updated successfully, but these errors were encountered: