Documentation
¶
Index ¶
- Constants
- type BinaryReference
- type Builder
- type Compressor
- type FileSystemBinaryWriter
- func (w *FileSystemBinaryWriter) CanWrite(size int) bool
- func (w *FileSystemBinaryWriter) Dispose() error
- func (w *FileSystemBinaryWriter) GetBinary() (io.Reader, error)
- func (w *FileSystemBinaryWriter) Read(ref *BinaryReference) ([]byte, error)
- func (w *FileSystemBinaryWriter) Write(data []byte) (*BinaryReference, error)
- type FileSystemGzipCompressor
- type LargeBinaryWriter
Constants ¶
View Source
const MAXIMUM_CHUNK_SIZE = 1024 * 1024 * 500
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryReference ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds the list of binary data from given sequence of byte arrays.
func NewBuilder ¶
func NewBuilder(compressor Compressor, tmpFolderPath string) *Builder
type Compressor ¶
type FileSystemBinaryWriter ¶
type FileSystemBinaryWriter struct {
// contains filtered or unexported fields
}
FileSystemBinaryWriter is a basic implementation of the LargeTextWriter.
func NewFileSystemBinaryWriter ¶
func NewFileSystemBinaryWriter(tmpPath string, bufferIndex int, maxSize int) (*FileSystemBinaryWriter, error)
func (*FileSystemBinaryWriter) CanWrite ¶
func (w *FileSystemBinaryWriter) CanWrite(size int) bool
func (*FileSystemBinaryWriter) Dispose ¶
func (w *FileSystemBinaryWriter) Dispose() error
func (*FileSystemBinaryWriter) GetBinary ¶
func (w *FileSystemBinaryWriter) GetBinary() (io.Reader, error)
func (*FileSystemBinaryWriter) Read ¶
func (w *FileSystemBinaryWriter) Read(ref *BinaryReference) ([]byte, error)
func (*FileSystemBinaryWriter) Write ¶
func (w *FileSystemBinaryWriter) Write(data []byte) (*BinaryReference, error)
type FileSystemGzipCompressor ¶
type FileSystemGzipCompressor struct {
// contains filtered or unexported fields
}
func NewFileSystemGzipCompressor ¶
func NewFileSystemGzipCompressor(temporaryFolder string) *FileSystemGzipCompressor
func (*FileSystemGzipCompressor) CompressAll ¶
func (*FileSystemGzipCompressor) Dispose ¶
func (c *FileSystemGzipCompressor) Dispose() error
type LargeBinaryWriter ¶
type LargeBinaryWriter interface { // Check if the specified text can fit in the buffer CanWrite(size int) bool // Write the specified text and returns the BinaryReference Write(data []byte) (*BinaryReference, error) // Read buffer from a BinaryReference Read(ref *BinaryReference) ([]byte, error) // Obtain the result binary as io.Reader GetBinary() (io.Reader, error) // Free allocated resource for the writer Dispose() error }
LargeBinaryWriter stores text as a large binary chunk and returns BinaryReference points the buffer location.
Click to show internal directories.
Click to hide internal directories.