Documentation ¶
Overview ¶
Package tailer contains machinery for tailing a specific file, or a set of files matching a pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathWatcher ¶
type PathWatcher struct {
// contains filtered or unexported fields
}
func NewPathWatcher ¶
func NewPathWatcher( pattern patternFunc, filter filterFunc, handlerFactory handlers.LineHandlerFactory, stateRecorder StateRecorder, ) *PathWatcher
func (*PathWatcher) Start ¶
func (p *PathWatcher) Start()
func (*PathWatcher) Stop ¶
func (p *PathWatcher) Stop()
type StateRecorder ¶
type StateRecorder interface { Record(path string, offset int64) error Get(path string) (int64, error) Delete(path string) error }
func NewStateRecorder ¶
func NewStateRecorder(stateFilePath string) (StateRecorder, error)
type StateRecorderImpl ¶
type StateRecorderImpl struct {
// contains filtered or unexported fields
}
func (*StateRecorderImpl) Delete ¶
func (s *StateRecorderImpl) Delete(path string) (err error)
type Tailer ¶
type Tailer struct {
// contains filtered or unexported fields
}
Tailer tails a single file, passing each line off to the handler.
func NewTailer ¶
func NewTailer(path string, handler handlers.LineHandler, stateRecorder StateRecorder) *Tailer
Click to show internal directories.
Click to hide internal directories.