Esempio n. 1
0
func (h *Harvester) getState() file.State {

	if h.config.InputType == config.StdinInputType {
		return file.State{}
	}

	// refreshes the values in State with the values from the harvester itself
	h.state.FileStateOS = file.GetOSState(h.state.Fileinfo)
	return h.state
}
Esempio n. 2
0
File: log.go Progetto: yhyang1/beats
// refreshState refreshes the values in State with the values from the harvester itself
func (h *Harvester) refreshState() {
	h.State.Source = h.Path
	h.State.Offset = h.getOffset()
	h.State.FileStateOS = file.GetOSState(h.State.Fileinfo)
}