Documentation
¶
Index ¶
Constants ¶
View Source
const MAXIMUM_CHUNK_SIZE = 1024 * 1024 * 50
Variables ¶
View Source
var ErrBufferChunkFilled = errors.New("this buffer is already full")
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) ChunkReader ¶
func (w *FileSystemBinaryWriter) ChunkReader() (io.ReadCloser, error)
func (*FileSystemBinaryWriter) Read ¶
func (w *FileSystemBinaryWriter) Read(ref *BinaryReference) ([]byte, error)
func (*FileSystemBinaryWriter) Seal ¶
func (w *FileSystemBinaryWriter) Seal() error
Seal implements LargeBinaryWriter.
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) Compress ¶
func (c *FileSystemGzipCompressor) Compress(ctx context.Context, reader io.Reader) (io.ReadCloser, error)
type LargeBinaryWriter ¶
type LargeBinaryWriter interface {
// Write the specified text and returns the BinaryReference
Write(data []byte) (*BinaryReference, error)
// Read buffer from a BinaryReference
Read(ref *BinaryReference) ([]byte, error)
// ChunkReader returns a read closer for the result binary chunk.
ChunkReader() (io.ReadCloser, error)
// Seal marks this writer done writing.
Seal() 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.