Documentation
¶
Overview ¶
Package logtail keeps the most recent lines of a log in memory and streams new ones to followers.
A Tail is an io.Writer, so it can sit next to the log file behind an io.MultiWriter. Writes never block on followers: a follower that falls behind misses lines rather than slowing the logger down.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tail ¶
type Tail struct {
// contains filtered or unexported fields
}
Tail is an io.Writer that remembers the last lines written to it. It is safe for concurrent use.
func (*Tail) Follow ¶
Follow calls emit with every kept line, oldest first, then with each new line until ctx is done. emit is called from Follow's goroutine only.
Click to show internal directories.
Click to hide internal directories.