summaryrefslogtreecommitdiff
path: root/internal/io/fs/tailfile.go
blob: 7a40ac45c9c2fe1ba8e2a98bf209d498d01ddb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package fs

// TailFile is to tail and filter a log file.
type TailFile struct {
	readFile
}

// NewTailFile returns a new file tailer.
func NewTailFile(filePath string, globID string, serverMessages chan<- string) TailFile {
	return TailFile{
		readFile: readFile{
			filePath:       filePath,
			globID:         globID,
			serverMessages: serverMessages,
			retry:          true,
			canSkipLines:   true,
			seekEOF:        true,
		},
	}
}