Documentation ¶
Overview ¶
The harvester package harvest different inputs for new information. Currently two harvester types exist:
- log
- stdin
The log harvester reads a file line by line. In case the end of a file is found with an incomplete line, the line pointer stays at the beginning of the incomplete line. As soon as the line is completed, it is read and returned.
The stdin harvesters reads data from stdin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRegexps ¶
InitRegexps initializes a list of compiled regular expressions.
Types ¶
type FileSource ¶
type Harvester ¶
type Harvester struct { Path string /* the file path to harvest */ Config *config.HarvesterConfig Stat *input.FileStat SpoolerChan chan *input.FileEvent ExcludeLinesRegexp []*regexp.Regexp IncludeLinesRegexp []*regexp.Regexp // contains filtered or unexported fields }
func NewHarvester ¶
func (*Harvester) Harvest ¶
func (h *Harvester) Harvest()
Log harvester reads files line by line and sends events to the defined output
func (*Harvester) UpdateState ¶
func (h *Harvester) UpdateState()
type LogSource ¶
type LogSource interface { io.ReadCloser Name() string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.