Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "file"
Variables ¶
This section is empty.
Functions ¶
func IsNotExist ¶
Types ¶
type Config ¶
type Config struct { input.Config Path string `hcl:"path" yaml:"path" json:"path"` // path glob ReadBuffer config.Size `hcl:"read_buffer" yaml:"read_buffer" json:"read_buffer"` // read buffer size Codec string `hcl:"codec" yaml:"codec" json:"codec"` // codec name (deefault - line) // Username string `hcl:"username" yaml:"username"` // Pasword string `hcl:"usernam" yaml:"username"` Interval time.Duration `hcl:"interval" yaml:"interval" json:"interval"` // mode = tail If no file record in seek db, no shutdown on io.EOF. If no file record in seek db, depend on start_end // mode = read If no file record in seek db, read from start and exit on io.OEF (for completed files), start_end is ignored Mode Mode `hcl:"mode" yaml:"mode" json:"mode"` StartEnd bool `hcl:"start_end" yaml:"start_end" json:"start_end"` // read from end if no file record in seek db SeekFile string `hcl:"seek_file" yaml:"seek_file" json:"seek_file"` // if not set, read from end after start }
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is file input reader.
In some cases (partial write to file during log rotate) can read incomplete line.
So use proper codec with format check (better, don't fire event) or do post validate in filters (slower)
type Mode ¶
type Mode int8
func (*Mode) UnmarshalYAML ¶
UnmarshalYAML for use Aggregation in yaml files
Click to show internal directories.
Click to hide internal directories.