class

EasyAwscr::S3::Internals::AsyncChunkUploader

Inherits EasyAwscr::S3::Internals::ChunkedIO::Handler < Reference < Object

This is an experimental implementation. Be warned that error handling is non-existant. The performance should be comparable to the AWS cli tool.

Constructors

new(client : Client, bucket : String, object : String, headers : Hash(String, String) = Hash(String, String).new, *, max_workers : Int32 = 8)
Source

Instance methods

close

Will be called once after the last write operation.

Source
open

Will be called once before the first write operation.

Source
write(buffer : IO::Memory) : IO::Memory | Nil

Can be called multiple times. The input is the current chunk. The implementer can either process it synchronously or asynchronously. Optionally, the function can return a buffer (either the input buffer or another buffer of equal size) that the ChunkedIO class can reuse. However, it is always safe to return nil and let the class reallocate a new buffer instead.

Source