reader

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

type FileReader interface {
	// ReadAll - reads a whole file in a single chunk.
	ReadAll(file *os.File) *model.Chunk
	// ReadByChunks - reads a file by separated chunks and passed it into the channel.
	ReadByChunks(file *os.File, offset int64) chan *model.Chunk
}

type FileReaderService

type FileReaderService struct {
	// contains filtered or unexported fields
}

func NewFileReaderService

func NewFileReaderService(ctx context.Context, logger logger.Logger, chunkSize int) *FileReaderService

func (*FileReaderService) ReadAll

func (r *FileReaderService) ReadAll(file *os.File) *model.Chunk

ReadAll - reads a whole file in a single chunk.

func (*FileReaderService) ReadByChunks

func (r *FileReaderService) ReadByChunks(file *os.File, offset int64) chan *model.Chunk

ReadByChunks - reads a file by separated chunks and passed it into the channel (chunk size is setting up through env. configuration).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL