Documentation ¶
Overview ¶
Package filesystem utilities for read and write files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilenameFunc ¶
type FilenameFunc func() string
FilenameFunc provide a wrapper to implement a Filenamer with just a func()string
func (FilenameFunc) Filename ¶
func (f FilenameFunc) Filename([]byte) string
Filename return a filename to be opened by worker
type Filenamer ¶
Filenamer is used to provide an easy way to generate dynamic files name to reader/writer msg is readed from input chanel in Process
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader for every message received it call Filenamer.Filename(msg) to get a filename to open a given file, then read it until eof or context is cancelled
func NewReader ¶
func NewReader(opts ReaderOptions) *Reader
NewReader create a new reader with goven options
type ReaderOptions ¶
type ReaderOptions struct { Fs afero.Fs SplitFunc bufio.SplitFunc Filename Filenamer Handler selina.ErrorHandler }
ReaderOptions configuration for Reader worker
Click to show internal directories.
Click to hide internal directories.