Documentation ¶
Index ¶
Constants ¶
View Source
const ( // file is eof, eof might triggered multiple times. EventEof = "eof" // if the tailing file get truncated or deleted, tail will restart EventTailRestart = "rs" )
Variables ¶
View Source
var ( //SeekFromEnd tail file from end SeekFromEnd = &SeekOffset{ Offset: 0, Whence: io.SeekEnd, } // SeekOffsetAuto tail file from offset (end - 1000) if file size is gt than 1000, else tail from start SeekOffsetAuto = &SeekOffset{ Offset: 0, Whence: -1, } // SeekFromStart tail file from offset 0 SeekFromStart = &SeekOffset{ Offset: 0, Whence: io.SeekStart, } )
Functions ¶
Types ¶
type Config ¶
type Config struct { PollInterval time.Duration Offset *SeekOffset Follow bool }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type SeekOffset ¶
Click to show internal directories.
Click to hide internal directories.