Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrWatcherInit = 1 << iota ErrWatcherAdd ErrWatcherClosed ErrWatcherErr ErrFileOpen ErrFileRead ErrFileSeek )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileFollower ¶
type FileFollower struct { Name string File *os.File Watcher *fsnotify.Watcher // Position int64 Follow bool // whether to keep running if the file is recreated/truncated/... }
func NewFileFollower ¶
func NewFileFollower(name string, follow bool) *FileFollower
func (*FileFollower) InitFile ¶
func (ff *FileFollower) InitFile()
func (*FileFollower) InitWatcher ¶
func (ff *FileFollower) InitWatcher()
func (*FileFollower) SeekEnd ¶
func (ff *FileFollower) SeekEnd() int64
func (*FileFollower) TailFile ¶
func (ff *FileFollower) TailFile(c chan<- string)
Click to show internal directories.
Click to hide internal directories.