Documentation ¶
Index ¶
Constants ¶
View Source
const (
ModuleName = "file"
)
Variables ¶
This section is empty.
Functions ¶
func InitHandler ¶
func InitHandler(confraw *config.ConfigRaw) (retconf config.TypeInputConfig, err error)
Types ¶
type InputConfig ¶
type InputConfig struct { config.InputConfig Path string `json:"path"` StartPos string `json:"start_position,omitempty"` // one of ["beginning", "end"] SinceDBPath string `json:"sincedb_path,omitempty"` SinceDBWriteInterval int `json:"sincedb_write_interval,omitempty"` SinceDBInfos map[string]*SinceDBInfo `json:"-"` SinceDBLastSaveTime time.Time `json:"-"` // contains filtered or unexported fields }
func DefaultInputConfig ¶
func DefaultInputConfig() InputConfig
func (*InputConfig) CheckSaveSinceDBInfos ¶
func (self *InputConfig) CheckSaveSinceDBInfos() (err error)
func (*InputConfig) CheckSaveSinceDBInfosLoop ¶
func (self *InputConfig) CheckSaveSinceDBInfosLoop() (err error)
func (*InputConfig) LoadSinceDBInfos ¶
func (self *InputConfig) LoadSinceDBInfos() (err error)
func (*InputConfig) SaveSinceDBInfos ¶
func (self *InputConfig) SaveSinceDBInfos() (err error)
func (*InputConfig) Start ¶
func (t *InputConfig) Start()
type SinceDBInfo ¶
type SinceDBInfo struct {
Offset int64 `json:"offset,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.