Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorInvalidDataBlockSize = errors.New("invalid data block size")
)
Functions ¶
This section is empty.
Types ¶
type BlockError ¶
type BlockError func(w BlockWriter, offset int64, err error)
type BlockFinisher ¶
type BlockFinisher func(w BlockWriter, size int64)
type BlockReader ¶
type BlockReader interface { // FileBlocks Returns offsets of the file. FileBlocks(path string) (offsets []int64, err error) // ReadBlock Returns block data. ReadBlock(path string, offset int64) (data []byte, isLastBlock bool, err error) }
func NewPlainReader ¶
func NewPlainReader(l esl.Logger, blockSize int) BlockReader
type BlockRequester ¶
type BlockRequester func(w BlockWriter, offset, blockSize int64)
type BlockWriter ¶
type BlockWriterFactory ¶
type BlockWriterFactory interface { // Open a file with the block size. Open(path string, fileSize int64, req BlockRequester, fin BlockFinisher, be BlockError) BlockWriter // Wait for finish all writers Wait() }
BlockWriterFactory Creates the stateful BlockWriter instance for write data in blocks. BlockWriter requests subsequent blocks if the instance can handle multiple blocks.
func NewWriterFactory ¶
func NewWriterFactory(l esl.Logger, batchSize int, blockSize int) BlockWriterFactory
Click to show internal directories.
Click to hide internal directories.