Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Tail ¶
func Tail(ctx context.Context, path string, backfillLines int, pollInterval time.Duration) (<-chan string, error)
Tail streams a log file: first up to backfillLines of the existing tail, then each newly-appended line, on the returned channel. The channel is closed when ctx is cancelled or an unrecoverable read error occurs. Returns an error if the file cannot be opened. pollInterval controls how often appended bytes are polled.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.