mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 17:38:52 +02:00
fs: add context.Ctx to ChunkWriter methods
WriteChunk in particular needs a different context from that which OpenChunkWriter was used with so add it to all the methods.
This commit is contained in:
@@ -652,13 +652,13 @@ type OpenChunkWriterFn func(ctx context.Context, remote string, src ObjectInfo,
|
||||
|
||||
type ChunkWriter interface {
|
||||
// WriteChunk will write chunk number with reader bytes, where chunk number >= 0
|
||||
WriteChunk(chunkNumber int, reader io.ReadSeeker) (bytesWritten int64, err error)
|
||||
WriteChunk(ctx context.Context, chunkNumber int, reader io.ReadSeeker) (bytesWritten int64, err error)
|
||||
|
||||
// Close complete chunked writer
|
||||
Close() error
|
||||
Close(ctx context.Context) error
|
||||
|
||||
// Abort chunk write
|
||||
Abort() error
|
||||
Abort(ctx context.Context) error
|
||||
}
|
||||
|
||||
// UserInfoer is an optional interface for Fs
|
||||
|
Reference in New Issue
Block a user