package follow
import "zgo.at/follow"
Index ¶
Types ¶
type Data ¶
func (Data) String ¶
type Follower ¶
type Follower struct {
Data chan Data // Data read from the file.
Ready chan struct{} // Closed if everything is set up.
Reopen chan os.Signal // Send signal to reopen file.
// Retry opening the file if it disappears for this period; this will
// attempt to open the file every second.
//
// Default is 2s; set to -1 to retry forever.
Retry time.Duration
// contains filtered or unexported fields
}
func New ¶
func New() Follower
func (*Follower) Start ¶
Start following a file for changes.
func (Follower) Stop ¶
func (f Follower) Stop()
Stop following a file for changes.
Source Files ¶
follow.go
Directories ¶
| Path | Synopsis |
|---|---|
| tail |
- Version
- v0.0.0-20250412000721-fecf5127a123 (latest)
- Published
- Apr 12, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 6 months ago –
Tools for package owners.