Documentation ¶
Index ¶
- func ClearTailerOffset(prefix string, tailer *tail.Tail)
- func GetFileIno(file string) (uint64, error)
- func ReadTailFileOffset(prefix, file string, fallback *tail.SeekInfo) (*tail.SeekInfo, error)
- func SaveTailerOffset(prefix string, tailer *tail.Tail, lastOffset int64) (offset int64, changed bool)
- type Liner
- type Tail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearTailerOffset ¶
ClearTailerOffset 删除tail文件对应的.offset文件
func GetFileIno ¶
GetFileIno 获得文件的Inode值。这样,在文件被重建时(文件名不变),可以使用Inode来确定文件是否被重新创建
func ReadTailFileOffset ¶
ReadTailFileOffset 读取tail文件对应的.offset文件记录的偏移位置
Types ¶
type Tail ¶
type Tail struct { FromBeginning bool `pflag:"Read file from beginning"` Pipe bool `pflag:"Whether file is a named pipe"` WatchMethod string `pflag:"Method used to watch for file updates(inotify/poll), default inotify"` OffsetSavePrefix string `pflag:"Offset save file prefix in in ~, default logtail"` Files []string `pflag:"Files to tail"` // contains filtered or unexported fields }
Tail tail log files.
Click to show internal directories.
Click to hide internal directories.