Struct: s3manager.BufferedReadSeekerWriteToPool
Overview
BufferedReadSeekerWriteToPool uses a sync.Pool to create and reuse []byte slices for buffering parts in memory
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.ReadSeekerWriteToProvider, s3manager.WriterReadFrom
Constructor Functions collapse
-
func NewBufferedReadSeekerWriteToPool(size int) *BufferedReadSeekerWriteToPool
NewBufferedReadSeekerWriteToPool will return a new BufferedReadSeekerWriteToPool that will create a pool of reusable buffers .
Method Summary collapse
-
func (p *BufferedReadSeekerWriteToPool) GetWriteTo(seeker io.ReadSeeker) (r ReadSeekerWriteTo, cleanup func())
GetWriteTo will wrap the provided io.ReadSeeker with a BufferedReadSeekerWriteTo.
Function Details
func NewBufferedReadSeekerWriteToPool(size int) *BufferedReadSeekerWriteToPool
NewBufferedReadSeekerWriteToPool will return a new BufferedReadSeekerWriteToPool that will create a pool of reusable buffers . If size is less then < 64 KiB then the buffer will default to 64 KiB. Reason: io.Copy from writers or readers that don't support io.WriteTo or io.ReadFrom respectively will default to copying 32 KiB.
40 41 42 43 44 45 46 47 48 49 50 |
// File 'service/s3/s3manager/read_seeker_write_to.go', line 40
|
Method Details
func (p *BufferedReadSeekerWriteToPool) GetWriteTo(seeker io.ReadSeeker) (r ReadSeekerWriteTo, cleanup func())
GetWriteTo will wrap the provided io.ReadSeeker with a BufferedReadSeekerWriteTo. The provided cleanup must be called after operations have been completed on the returned io.ReadSeekerWriteTo in order to signal the return of resources to the pool.
55 56 57 58 59 60 61 62 63 64 |
// File 'service/s3/s3manager/read_seeker_write_to.go', line 55
|