We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 125b4c5 commit 35d28d5Copy full SHA for 35d28d5
internal/reader/reader.go
@@ -17,13 +17,15 @@ type reader struct {
17
cfg *config.Config
18
}
19
20
+// NewReader returns a new instance of the Reader struct.
21
func NewReader(l logger.Logger, c *config.Config) *reader {
22
return &reader{
23
logger: l,
24
cfg: c,
25
26
27
28
+// ReadAndBatch reads from the file configured in the Reader struct's config and pushes raw logs into a batch channel for further processing.
29
func (r *reader) ReadAndBatch(batchChannel chan<- []string) error {
30
file, err := os.Open(r.cfg.InputFilePath)
31
if err != nil {
0 commit comments