Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStop = fmt.Errorf("tail should now stop")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Location *SeekInfo // Seek to this location before tailing Follow bool // Continue looking for new lines (tail -f) ReOpen bool // Reopen recreated files (tail -F) MustExist bool // Fail early if the file does not exist Poll bool // Poll for file changes instead of using inotify MaxLineSize int // If non-zero, split longer lines into multiple lines LimitRate int64 // If non-zero, limit the rate of read log lines }
Config is used to specify how a file must be tailed.
type RateMonitor ¶
type RateMonitor struct {
// contains filtered or unexported fields
}
RateMonitor is a naive rate monitor that monitors the number of items processed in the current second.
func (*RateMonitor) Tick ¶
func (r *RateMonitor) Tick(unixTime int64) int64
type Tail ¶
type Tail struct { Filename string Lines chan *Line Config tomb.Tomb // provides: Done, Kill, Dying // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.