Struct: aws.WriteAtBuffer
Overview
A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface Can be used with the s3manager.Downloader to download content to a buffer in memory. Safe to use concurrently.
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, awserr.UnmarshalError, s3manager.WriterReadFrom
Structure Field Summary collapse
-
GrowthCoeff float64
GrowthCoeff defines the growth rate of the internal buffer.
Constructor Functions collapse
-
func NewWriteAtBuffer(buf []byte) *WriteAtBuffer
NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer provided by buf.
Method Summary collapse
-
func (b *WriteAtBuffer) Bytes() []byte
Bytes returns a slice of bytes written to the buffer.
-
func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error)
WriteAt writes a slice of bytes to a buffer starting at the position provided The number of bytes written will be returned, or error.
Structure Field Details
GrowthCoeff float64
GrowthCoeff defines the growth rate of the internal buffer. By default, the growth rate is 1, where expanding the internal buffer will allocate only enough capacity to fit the new expected length.
Function Details
func NewWriteAtBuffer(buf []byte) *WriteAtBuffer
NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer provided by buf.
175 176 177 |
// File 'aws/types.go', line 175
|
Method Details
func (b *WriteAtBuffer) Bytes() []byte
Bytes returns a slice of bytes written to the buffer.
203 204 205 206 207 |
// File 'aws/types.go', line 203
|
func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error)
WriteAt writes a slice of bytes to a buffer starting at the position provided The number of bytes written will be returned, or error. Can overwrite previous written slices if the write ats overlap.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
// File 'aws/types.go', line 182
|