Struct: s3manager.PooledBufferedReadFromProvider
Overview
PooledBufferedReadFromProvider is a WriterReadFromProvider that uses a sync.Pool to manage allocation and reuse of *bufio.Writer structures.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom, s3manager.WriterReadFromProvider
Constructor Functions collapse
-
func NewPooledBufferedWriterReadFromProvider(size int) *PooledBufferedReadFromProvider
NewPooledBufferedWriterReadFromProvider returns a new PooledBufferedReadFromProvider Size is used to control the size of the underlying *bufio.Writer created for calls to GetReadFrom.
Method Summary collapse
-
func (p *PooledBufferedReadFromProvider) GetReadFrom(writer io.Writer) (r WriterReadFrom, cleanup func())
GetReadFrom takes an io.Writer and wraps it with a type which satisfies the WriterReadFrom interface/ Additionally a cleanup function is provided which must be called after usage of the WriterReadFrom has been completed in order to allow the reuse of the *bufio.Writer.
Function Details
func NewPooledBufferedWriterReadFromProvider(size int) *PooledBufferedReadFromProvider
NewPooledBufferedWriterReadFromProvider returns a new PooledBufferedReadFromProvider Size is used to control the size of the underlying *bufio.Writer created for calls to GetReadFrom.
48 49 50 51 52 53 54 55 56 57 58 59 60 |
// File 'service/s3/s3manager/writer_read_from.go', line 48
|
Method Details
func (p *PooledBufferedReadFromProvider) GetReadFrom(writer io.Writer) (r WriterReadFrom, cleanup func())
GetReadFrom takes an io.Writer and wraps it with a type which satisfies the WriterReadFrom interface/ Additionally a cleanup function is provided which must be called after usage of the WriterReadFrom has been completed in order to allow the reuse of the *bufio.Writer
65 66 67 68 69 70 71 72 73 74 |
// File 'service/s3/s3manager/writer_read_from.go', line 65
|